From f28c50ed7f409e49763df31de6b4400246f39e04 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 2 Aug 2014 16:24:27 +0200 Subject: [PATCH] allow negative min/max values for sliders (fix #285) --- morphic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morphic.js b/morphic.js index 2bbdd4ea..3c46960e 100644 --- a/morphic.js +++ b/morphic.js @@ -5916,14 +5916,14 @@ SliderMorph.prototype.setStart = function (num) { var newStart; if (typeof num === 'number') { this.start = Math.min( - Math.max(num, 0), + num, this.stop - this.size ); } else { newStart = parseFloat(num); if (!isNaN(newStart)) { this.start = Math.min( - Math.max(newStart, 0), + newStart, this.stop - this.size ); }