aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorhwc4872012-04-26 13:04:25 -0700
committerhwc4872012-04-26 13:04:25 -0700
commit37f2d5230175c0fb9a4792f5e3d804f7604442e1 (patch)
treec8260f151270c6bdbe08869ebaeb837777c28d1b /js/panels
parentf13d0f45f6b449764898e99db309c43b51a33476 (diff)
parent902dc18296fc78f3b8e67d952c42981d926bb2fc (diff)
downloadninja-37f2d5230175c0fb9a4792f5e3d804f7604442e1.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js21
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js1
-rwxr-xr-xjs/panels/properties.reel/properties.js5
3 files changed, 13 insertions, 14 deletions
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js
index bbccf45d..bd10f7a5 100755
--- a/js/panels/Materials/materials-popup.reel/materials-popup.js
+++ b/js/panels/Materials/materials-popup.reel/materials-popup.js
@@ -214,10 +214,9 @@ exports.MaterialsPopup = Montage.create(Component, {
214 enumerable: true, 214 enumerable: true,
215 value: function(materialID) 215 value: function(materialID)
216 { 216 {
217 // Note that setting Array.length = 0 will empty arrays, 217 //TODO - Hack to force repetition to draw. Setting .length = 0 did not work.
218 // which is fine if you use getMaterialData to get a new array, but not for the 218 this.materialsData = [];
219 // dummyData arrays. 219
220 this._materialsData.length = 0;
221 this._materialName = materialID; 220 this._materialName = materialID;
222 if( 221 if(
223 (materialID === "UberMaterial") || 222 (materialID === "UberMaterial") ||
@@ -231,16 +230,14 @@ exports.MaterialsPopup = Montage.create(Component, {
231 if (material) 230 if (material)
232 { 231 {
233 this._material = material; 232 this._material = material;
234 var matData = this.getMaterialData( material ); 233 this.materialsData = this.getMaterialData( material );
235 this.materialsData = matData;
236 } 234 }
237 } 235 }
238 else 236 else
239 { 237 {
240 this.materialsData = this._dummyData1.slice(0); 238 this.materialsData = this[materialID];
241 } 239 }
242 240 this.needsDraw = true;
243 this.needsDraw = true;
244 } 241 }
245 }, 242 },
246 243
@@ -445,7 +442,8 @@ exports.MaterialsPopup = Montage.create(Component, {
445 } 442 }
446 }, 443 },
447 444
448 _dummyData1: { 445 // _dummyData1
446 CheckerBoard: {
449 value: [ 447 value: [
450 { 448 {
451 "label": "Texture1", 449 "label": "Texture1",
@@ -588,7 +586,8 @@ exports.MaterialsPopup = Montage.create(Component, {
588 ] 586 ]
589 }, 587 },
590 588
591 _dummyData2: { 589 // _dummyData2
590 ShinyMetal: {
592 value: [ 591 value: [
593 { 592 {
594 "label": "Diffuse", 593 "label": "Diffuse",
diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js
index 5d3c0a73..79eac37b 100755
--- a/js/panels/components-panel.reel/components-panel.js
+++ b/js/panels/components-panel.reel/components-panel.js
@@ -8,7 +8,6 @@ var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component, 8 Component = require("montage/ui/component").Component,
9 NJUtils = require("js/lib/NJUtils").NJUtils; 9 NJUtils = require("js/lib/NJUtils").NJUtils;
10 10
11var treeControlModule = require("js/components/tree.reel");
12var PIData = require("js/data/pi/pi-data").PiData; 11var PIData = require("js/data/pi/pi-data").PiData;
13 12
14String.prototype.capitalizeFirstChar = function() { 13String.prototype.capitalizeFirstChar = function() {
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index d9dca538..b21014c1 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -73,8 +73,9 @@ exports.Properties = Montage.create(Component, {
73 73
74 this.eventManager.addEventListener( "elementChange", this, false); 74 this.eventManager.addEventListener( "elementChange", this, false);
75 75
76 // For now always assume that the stage is selected by default 76 // For now always assume that the stage is selected by default when opening the old template
77 if(this.application.ninja.selectedElements.length === 0) { 77 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
78 if(this.application.ninja.selectedElements.length === 0 && this.application.ninja.currentDocument.documentRoot.nodeName.toLowerCase() !== "body") {
78 this.displayStageProperties(); 79 this.displayStageProperties();
79 } 80 }
80 } 81 }