소스 검색

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