Skip to content

Commit

Permalink
- fix throttle function parameters
Browse files Browse the repository at this point in the history
- remove !isNaN
  • Loading branch information
peuter committed Oct 28, 2017
1 parent 6232ad2 commit c3b7986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/class/cv/ui/structure/pure/Slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ qx.Class.define('cv.ui.structure.pure.Slide', {
// set initial value
slider.setValue(parseFloat(this.getValue()));

slider.on("changeValue", qx.util.Function.throttle(this._onChangeValue, 250, true), this);
slider.on("changeValue", qx.util.Function.throttle(this._onChangeValue, 250), this);

this.addListener("changeValue", function (ev) {
slider.setValue(parseFloat(ev.getData()));
Expand Down Expand Up @@ -193,7 +193,7 @@ qx.Class.define('cv.ui.structure.pure.Slide', {
var currentValue = this.getValue();
this.sendToBackend(value, function(addr) {
var newValue = cv.Transform.encode(addr[0], value);
return !isNaN(newValue) && newValue !== cv.Transform.encode(addr[0], currentValue);
return (newValue !== cv.Transform.encode(addr[0], currentValue));
});
}
this.setValue(value);
Expand Down

0 comments on commit c3b7986

Please sign in to comment.