diff options
author | Nivesh Rajbhandari | 2012-05-18 15:14:36 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-18 15:14:36 -0700 |
commit | 3e22b0940bb7752e292e485d8a393f215cae05de (patch) | |
tree | 0b3e70737ab040b12a1eb1fbbabb79f6826783db /js | |
parent | a396caf12a9e1fc84b984d39f8e671c335d2f5d5 (diff) | |
download | ninja-3e22b0940bb7752e292e485d8a393f215cae05de.tar.gz |
Fixed Materials Popup to work with new changes to repetition bindings.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js')
4 files changed, 19 insertions, 5 deletions
diff --git a/js/components/ui/input-group.reel/input-group.html b/js/components/ui/input-group.reel/input-group.html index ba85c089..7da4a855 100755 --- a/js/components/ui/input-group.reel/input-group.html +++ b/js/components/ui/input-group.reel/input-group.html | |||
@@ -25,7 +25,8 @@ | |||
25 | "bindings": { | 25 | "bindings": { |
26 | "data": { | 26 | "data": { |
27 | "boundObject": {"@": "propList"}, | 27 | "boundObject": {"@": "propList"}, |
28 | "boundObjectPropertyPath": "objectAtCurrentIteration" | 28 | "boundObjectPropertyPath": "objectAtCurrentIteration", |
29 | "oneway": true | ||
29 | } | 30 | } |
30 | }, | 31 | }, |
31 | "listeners": [ | 32 | "listeners": [ |
diff --git a/js/components/ui/property-control.reel/property-control.js b/js/components/ui/property-control.reel/property-control.js index c28979a9..20ec173e 100755 --- a/js/components/ui/property-control.reel/property-control.js +++ b/js/components/ui/property-control.reel/property-control.js | |||
@@ -120,8 +120,13 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
120 | set: function (data) { | 120 | set: function (data) { |
121 | if (data !== this._data) { | 121 | if (data !== this._data) { |
122 | this._data = data; | 122 | this._data = data; |
123 | this.label = data.label; | 123 | if(data) { |
124 | this.controlType = data.controlType; | 124 | this._label = data.label; |
125 | this._controlType = data.controlType; | ||
126 | } else { | ||
127 | this._label = ""; | ||
128 | this._controlType = null; | ||
129 | } | ||
125 | this.needsDraw = true; | 130 | this.needsDraw = true; |
126 | } | 131 | } |
127 | } | 132 | } |
@@ -143,6 +148,9 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
143 | { | 148 | { |
144 | value:function(event) | 149 | value:function(event) |
145 | { | 150 | { |
151 | if(event.wasSetByCode) { | ||
152 | return; | ||
153 | } | ||
146 | this._dispatchPropEvent(event); | 154 | this._dispatchPropEvent(event); |
147 | } | 155 | } |
148 | }, | 156 | }, |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html index d18599d6..bac722cd 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.html +++ b/js/panels/Materials/materials-popup.reel/materials-popup.html | |||
@@ -43,7 +43,7 @@ | |||
43 | "data": { | 43 | "data": { |
44 | "boundObject": {"@": "materialsProperties"}, | 44 | "boundObject": {"@": "materialsProperties"}, |
45 | "boundObjectPropertyPath": "objectAtCurrentIteration", | 45 | "boundObjectPropertyPath": "objectAtCurrentIteration", |
46 | "oneway": false | 46 | "oneway": true |
47 | } | 47 | } |
48 | }, | 48 | }, |
49 | "listeners": [ | 49 | "listeners": [ |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index bd10f7a5..a4f758cf 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -625,6 +625,11 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
625 | } | 625 | } |
626 | ] | 626 | ] |
627 | }, | 627 | }, |
628 | |||
629 | materialsProperties: { | ||
630 | serializable: true, | ||
631 | value: null | ||
632 | }, | ||
628 | 633 | ||
629 | _materialsData: { | 634 | _materialsData: { |
630 | enumerable: true, | 635 | enumerable: true, |
@@ -641,7 +646,7 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
641 | }, | 646 | }, |
642 | set: function(data) { | 647 | set: function(data) { |
643 | this._materialsData = data; | 648 | this._materialsData = data; |
644 | if(this.materialsProperties) | 649 | if(this.materialsProperties && data.length) |
645 | { | 650 | { |
646 | this.materialsProperties.needsDraw = true; | 651 | this.materialsProperties.needsDraw = true; |
647 | } | 652 | } |