From 60d6346a78fb5257eaf36f17a5fcb764a342c012 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 16 Apr 2012 15:07:16 -0700 Subject: Fixed materials editor popup not refreshing correctly. Signed-off-by: Nivesh Rajbhandari --- .../materials-popup.reel/materials-popup.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'js/panels') 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, { enumerable: true, value: function(materialID) { - // Note that setting Array.length = 0 will empty arrays, - // which is fine if you use getMaterialData to get a new array, but not for the - // dummyData arrays. - this._materialsData.length = 0; + //TODO - Hack to force repetition to draw. Setting .length = 0 did not work. + this.materialsData = []; + this._materialName = materialID; if( (materialID === "UberMaterial") || @@ -231,16 +230,14 @@ exports.MaterialsPopup = Montage.create(Component, { if (material) { this._material = material; - var matData = this.getMaterialData( material ); - this.materialsData = matData; + this.materialsData = this.getMaterialData( material ); } } else { - this.materialsData = this._dummyData1.slice(0); + this.materialsData = this[materialID]; } - - this.needsDraw = true; + this.needsDraw = true; } }, @@ -445,7 +442,8 @@ exports.MaterialsPopup = Montage.create(Component, { } }, - _dummyData1: { + // _dummyData1 + CheckerBoard: { value: [ { "label": "Texture1", @@ -588,7 +586,8 @@ exports.MaterialsPopup = Montage.create(Component, { ] }, - _dummyData2: { + // _dummyData2 + ShinyMetal: { value: [ { "label": "Diffuse", -- cgit v1.2.3 From 03787df5da551620831c134aa11ee198397c9f6d Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 26 Apr 2012 10:51:57 -0700 Subject: We don't currently support perspective values on individual elements, so removing perspective values from the animation presets. Signed-off-by: Nivesh Rajbhandari --- js/panels/presets/default-animation-presets.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'js/panels') diff --git a/js/panels/presets/default-animation-presets.js b/js/panels/presets/default-animation-presets.js index 578c1622..753b3365 100644 --- a/js/panels/presets/default-animation-presets.js +++ b/js/panels/presets/default-animation-presets.js @@ -52,7 +52,6 @@ exports.animationPresets = { "-webkit-animation-direction": "normal", "-webkit-animation-timing-function": "ease", "-webkit-transform-style": "preserve-3d", - "-webkit-transform": "perspective(1000)", "-webkit-animation-delay": "0s" } },{ @@ -100,7 +99,6 @@ exports.animationPresets = { "-webkit-animation-timing-function": "ease-out", "-webkit-transform-origin": "100% 50%", "-webkit-transform-style": "preserve-3d", - "-webkit-transform": "perspective(1000)", "-webkit-animation-delay": "0s" } },{ @@ -109,31 +107,31 @@ exports.animationPresets = { "keyText": "0%", "styles": { "opacity": "1", - "-webkit-transform": "perspective(1000) rotateY(0deg)" + "-webkit-transform": "rotateY(0deg)" } }, { "keyText": "70%", "styles": { "opacity": "1", - "-webkit-transform": "perspective(1000) rotateY(0deg)" + "-webkit-transform": "rotateY(0deg)" } }, { "keyText": "85%", "styles": { "opacity": "0", - "-webkit-transform": "perspective(1000) rotateY(95deg)" + "-webkit-transform": "rotateY(95deg)" } }, { "keyText": "86%", "styles": { "opacity": "0", - "-webkit-transform": "perspective(1000) rotateY(-90deg)" + "-webkit-transform": "rotateY(-90deg)" } }, { "keyText": "100%", "styles": { "opacity": "1", - "-webkit-transform": "perspective(1000) rotateY(0deg)" + "-webkit-transform": "rotateY(0deg)" } }] }] @@ -151,7 +149,6 @@ exports.animationPresets = { "-webkit-animation-timing-function": "ease-out", "-webkit-transform-origin": "100% 50%", "-webkit-transform-style": "preserve-3d", - "-webkit-transform": "perspective(1000)", "-webkit-animation-delay": "0s" } },{ @@ -160,25 +157,25 @@ exports.animationPresets = { "keyText": "0%", "styles": { "opacity": "0", - "-webkit-transform": "perspective(1000) rotateY(-90deg)" + "-webkit-transform": "rotateY(-90deg)" } }, { "keyText": "15%", "styles": { "opacity": "1", - "-webkit-transform": "perspective(1000) rotateY(0deg)" + "-webkit-transform": "rotateY(0deg)" } }, { "keyText": "85%", "styles": { "opacity": "1", - "-webkit-transform": "perspective(1000) rotateY(0deg)" + "-webkit-transform": "rotateY(0deg)" } }, { "keyText": "100%", "styles": { "opacity": "0", - "-webkit-transform": "perspective(1000) rotateY(95deg)" + "-webkit-transform": "rotateY(95deg)" } }] }] -- cgit v1.2.3