summaryrefslogtreecommitdiff
path: root/morphic.js
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2014-09-30 09:40:28 +0200
committerJens Mönig <jens@moenig.org>2014-09-30 09:40:28 +0200
commit03390418ae308651de0f50bf09311cdc4591f682 (patch)
treea86f11dc2b351ceb1dad5a9471742ef3fa7c12ab /morphic.js
parentab3e1b3aabb8a22064db559228bf1038451d9b5a (diff)
parentf28c50ed7f409e49763df31de6b4400246f39e04 (diff)
downloadsnap-03390418ae308651de0f50bf09311cdc4591f682.tar.gz
snap-03390418ae308651de0f50bf09311cdc4591f682.zip
Merge pull request #549 from Gubolin/issue_285
allow negative min/max values for sliders (fix #285)
Diffstat (limited to 'morphic.js')
-rw-r--r--morphic.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/morphic.js b/morphic.js
index 2a242f2..d56aad4 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
);
}