Преглед на файлове

Editor: Minor UI improvement.

Mr.doob преди 8 години
родител
ревизия
9c41aee9aa
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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;
 
 	}