diff options
author | Eric Guzman | 2012-05-18 17:27:31 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-18 17:27:31 -0700 |
commit | 13da56e791b7478ad3dbb8162a583a6b2c8c4b6b (patch) | |
tree | 3cdef0e1cc56507f2f14a715c19d207cbc0ef3af /js/panels/css-panel/css-style.reel/css-style.js | |
parent | e5f3f24f249ab5d2e260425d774c27f710be43bf (diff) | |
download | ninja-13da56e791b7478ad3dbb8162a583a6b2c8c4b6b.tar.gz |
Style Declaration - Handle removing styles
Removed sorting and had to put a null check in the style component because the valueText was being set to undefined and causing an error. Check with montage on why that is happening.
Diffstat (limited to 'js/panels/css-panel/css-style.reel/css-style.js')
-rw-r--r-- | js/panels/css-panel/css-style.reel/css-style.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/panels/css-panel/css-style.reel/css-style.js b/js/panels/css-panel/css-style.reel/css-style.js index 1787665f..dd84c7e9 100644 --- a/js/panels/css-panel/css-style.reel/css-style.js +++ b/js/panels/css-panel/css-style.reel/css-style.js | |||
@@ -14,6 +14,7 @@ exports.CssStyle = Montage.create(Component, { | |||
14 | editNewEmptyClass : { value: 'edit-empty-style' }, | 14 | editNewEmptyClass : { value: 'edit-empty-style' }, |
15 | invalidStyleClass : { value: "style-item-invalid" }, | 15 | invalidStyleClass : { value: "style-item-invalid" }, |
16 | emptyStyleClass : { value: "empty-css-style" }, | 16 | emptyStyleClass : { value: "empty-css-style" }, |
17 | source : { value: null }, | ||
17 | 18 | ||
18 | propertyText : { | 19 | propertyText : { |
19 | value: "property", | 20 | value: "property", |
@@ -29,6 +30,10 @@ exports.CssStyle = Montage.create(Component, { | |||
29 | return this._valueText; | 30 | return this._valueText; |
30 | }, | 31 | }, |
31 | set: function(text) { | 32 | set: function(text) { |
33 | /// TODO: Figure out why montage is trying to set this to undefined | ||
34 | /// TODO: when the style object is removed from the repetition | ||
35 | if(text === null || text === undefined) { return; } | ||
36 | |||
32 | this._valueText = this.browserValue = text; | 37 | this._valueText = this.browserValue = text; |
33 | this.units = this.getUnits(text); | 38 | this.units = this.getUnits(text); |
34 | } | 39 | } |