Browse Source

Update code style

Temdog007 6 năm trước cách đây
mục cha
commit
cc96ff0692
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      editor/js/Sidebar.Material.js

+ 5 - 4
editor/js/Sidebar.Material.js

@@ -624,12 +624,13 @@ Sidebar.Material = function ( editor ) {
 
 			}
 
-			if ( material.depthPacking !== undefined) {
+			if ( material.depthPacking !== undefined ) {
+
+				var depthPacking = parseInt( materialDepthPacking.getValue() );
+				if ( material.depthPacking !== depthPacking ) {
 
-				var depthPacking = parseInt(materialDepthPacking.getValue());
-				if(material.depthPacking !== depthPacking)
-				{
 					editor.execute( new SetMaterialValueCommand( currentObject, 'depthPacking', depthPacking, currentMaterialSlot ) );
+
 				}
 
 			}