diff options
author | Eric Guzman | 2012-05-17 19:55:18 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-17 19:55:18 -0700 |
commit | 7f0dad901bef6512357a7a768fda1cb3106ac864 (patch) | |
tree | d6fabda54309ba69a957c82c1bca28e12b28caa7 /js/panels/css-panel/style-declaration.reel | |
parent | 5c4cfc1a52b1cb079b1fa6f02aedcaef1ad2bc38 (diff) | |
download | ninja-7f0dad901bef6512357a7a768fda1cb3106ac864.tar.gz |
CSS Panel - Fix style declaration interaction
Diffstat (limited to 'js/panels/css-panel/style-declaration.reel')
-rw-r--r-- | js/panels/css-panel/style-declaration.reel/style-declaration.html | 3 | ||||
-rw-r--r-- | js/panels/css-panel/style-declaration.reel/style-declaration.js | 17 |
2 files changed, 11 insertions, 9 deletions
diff --git a/js/panels/css-panel/style-declaration.reel/style-declaration.html b/js/panels/css-panel/style-declaration.reel/style-declaration.html index fced7d7a..5724ffc3 100644 --- a/js/panels/css-panel/style-declaration.reel/style-declaration.html +++ b/js/panels/css-panel/style-declaration.reel/style-declaration.html | |||
@@ -25,7 +25,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
25 | "bindings": { | 25 | "bindings": { |
26 | "content": { | 26 | "content": { |
27 | "boundObject": {"@": "owner"}, | 27 | "boundObject": {"@": "owner"}, |
28 | "boundObjectPropertyPath": "styles" | 28 | "boundObjectPropertyPath": "styles", |
29 | "oneway": true | ||
29 | } | 30 | } |
30 | } | 31 | } |
31 | }, | 32 | }, |
diff --git a/js/panels/css-panel/style-declaration.reel/style-declaration.js b/js/panels/css-panel/style-declaration.reel/style-declaration.js index 61a65099..c679783e 100644 --- a/js/panels/css-panel/style-declaration.reel/style-declaration.js +++ b/js/panels/css-panel/style-declaration.reel/style-declaration.js | |||
@@ -85,6 +85,13 @@ exports.StyleDeclaration = Montage.create(Component, { | |||
85 | 85 | ||
86 | stylesArray = Array.prototype.slice.call(dec); | 86 | stylesArray = Array.prototype.slice.call(dec); |
87 | 87 | ||
88 | stylesArray.forEach(function(prop, index) { | ||
89 | this.styles.push({ | ||
90 | name: prop, | ||
91 | value: dec.getPropertyValue(prop) | ||
92 | }); | ||
93 | }, this); | ||
94 | |||
88 | if(this.includeEmptyStyle) { | 95 | if(this.includeEmptyStyle) { |
89 | this.styles.push({ | 96 | this.styles.push({ |
90 | name : "property", | 97 | name : "property", |
@@ -93,13 +100,6 @@ exports.StyleDeclaration = Montage.create(Component, { | |||
93 | }); | 100 | }); |
94 | } | 101 | } |
95 | 102 | ||
96 | stylesArray.forEach(function(prop, index) { | ||
97 | this.styles.push({ | ||
98 | name: prop, | ||
99 | value: dec.getPropertyValue(prop) | ||
100 | }); | ||
101 | }, this); | ||
102 | |||
103 | this._declaration = dec; | 103 | this._declaration = dec; |
104 | this.needsDraw = this.needsSort = true; | 104 | this.needsDraw = this.needsSort = true; |
105 | } | 105 | } |
@@ -218,7 +218,8 @@ exports.StyleDeclaration = Montage.create(Component, { | |||
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
221 | this.arrayController.addObjects(styleDescriptor); | 221 | this.styles.push(styleDescriptor); |
222 | this.arrayController.organizeObjects(); | ||
222 | } | 223 | } |
223 | }, | 224 | }, |
224 | 225 | ||