Explorar o código

Editor: Minor UI improvement.

Mr.doob %!s(int64=8) %!d(string=hai) anos
pai
achega
9c41aee9aa
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      editor/js/libs/ui.js

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

@@ -800,7 +800,9 @@ UI.Number.prototype.setValue = function ( value ) {
 		if ( value > this.max ) value = this.max;
 
 		this.value = value;
-		this.dom.value = value.toFixed( this.precision ) + ' ' + this.unit;
+		this.dom.value = value.toFixed( this.precision );
+
+		if ( this.unit !== '' ) this.dom.value += ' ' + this.unit;
 
 	}