Răsfoiți Sursa

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 ani în urmă
părinte
comite
10ebc45e45
1 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  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;
 
 };