Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
10ebc45e45
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  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;
 
 };