summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-08-02 16:24:27 +0200
committerGubolin <gubolin@fantasymail.de>2014-08-02 16:24:27 +0200
commitf28c50ed7f409e49763df31de6b4400246f39e04 (patch)
tree76eec1540be9f723cc1fb832d7180239dda3c142
parent0333925e916acc47c25cdcfec0c3be3d695a825f (diff)
downloadsnap-yow-f28c50ed7f409e49763df31de6b4400246f39e04.tar.gz
snap-yow-f28c50ed7f409e49763df31de6b4400246f39e04.zip
allow negative min/max values for sliders (fix #285)
-rw-r--r--morphic.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/morphic.js b/morphic.js
index 2bbdd4e..3c46960 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
);
}