Преглед изворни кода

Integer.setStep was misspelled as Number.setStep

Instead of Integer.setStep, Number.setStep was written. Changed this and added a check to make sure the step is an integer too.
user1713952 пре 8 година
родитељ
комит
10ebc45e45
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      editor/js/libs/ui.js

+ 4 - 3
editor/js/libs/ui.js

@@ -862,10 +862,11 @@ UI.Integer.prototype.setValue = function ( value ) {
 
 };
 
-UI.Number.prototype.setStep = function ( step ) {
-
-	this.step = step;
+UI.Integer.prototype.setStep = function ( step ) {
 
+	step = Math.max(step, Math.floor(step)); // Checks that step is an integer
+	this.step = step; 
+	
 	return this;
 
 };