diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/panels/css-panel/style-declaration.reel/style-declaration.js | 12 |
1 files changed, 11 insertions, 1 deletions
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 1ae1d6f4..61a65099 100644 --- a/js/panels/css-panel/style-declaration.reel/style-declaration.js +++ b/js/panels/css-panel/style-declaration.reel/style-declaration.js | |||
@@ -11,6 +11,7 @@ var Montage = require("montage/core/core").Montage, | |||
11 | exports.StyleDeclaration = Montage.create(Component, { | 11 | exports.StyleDeclaration = Montage.create(Component, { |
12 | cssText : { value: null }, | 12 | cssText : { value: null }, |
13 | focusDelegate : { value: null }, | 13 | focusDelegate : { value: null }, |
14 | needsSort : { value: null }, | ||
14 | 15 | ||
15 | includeEmptyStyle : { | 16 | includeEmptyStyle : { |
16 | value: true, | 17 | value: true, |
@@ -100,7 +101,7 @@ exports.StyleDeclaration = Montage.create(Component, { | |||
100 | }, this); | 101 | }, this); |
101 | 102 | ||
102 | this._declaration = dec; | 103 | this._declaration = dec; |
103 | this.needsDraw = true; | 104 | this.needsDraw = this.needsSort = true; |
104 | } | 105 | } |
105 | }, | 106 | }, |
106 | 107 | ||
@@ -267,6 +268,15 @@ exports.StyleDeclaration = Montage.create(Component, { | |||
267 | } | 268 | } |
268 | }, | 269 | }, |
269 | 270 | ||
271 | willDraw : { | ||
272 | value: function() { | ||
273 | if(this.needsSort) { | ||
274 | this.arrayController.organizeObjects(); | ||
275 | this.needsSort = false; | ||
276 | } | ||
277 | } | ||
278 | }, | ||
279 | |||
270 | _containsElement : { | 280 | _containsElement : { |
271 | value: function(innerElement) { | 281 | value: function(innerElement) { |
272 | var isInComponent = false, | 282 | var isInComponent = false, |