aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel
diff options
context:
space:
mode:
authorEric Guzman2012-05-17 16:03:50 -0700
committerEric Guzman2012-05-17 16:03:50 -0700
commit1f8ee914686a0fac3e256b4f18683b83d591e6a6 (patch)
treeb1bc4fd68910702c180a4a16ca1838f593d71262 /js/panels/css-panel
parentf5cd1f7a93e0dbc17600d96dcb2c20702c6b5fa5 (diff)
downloadninja-1f8ee914686a0fac3e256b4f18683b83d591e6a6.tar.gz
CSS Panel - declaration - sort objects when flag is set
Diffstat (limited to 'js/panels/css-panel')
-rw-r--r--js/panels/css-panel/style-declaration.reel/style-declaration.js12
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,
11exports.StyleDeclaration = Montage.create(Component, { 11exports.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,