浏览代码

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;
 
 	}