فهرست منبع

Update code style

Temdog007 6 سال پیش
والد
کامیت
cc96ff0692
1فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  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 ) );
 					editor.execute( new SetMaterialValueCommand( currentObject, 'depthPacking', depthPacking, currentMaterialSlot ) );
+
 				}
 				}
 
 
 			}
 			}