Merge pull request #549 from Gubolin/issue_285

allow negative min/max values for sliders (fix #285)
pull/3/merge
Jens Mönig 2014-09-30 09:40:28 +02:00
commit 03390418ae
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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
);
}