diff options
author | Eric Guzman | 2012-05-02 17:12:58 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-02 17:12:58 -0700 |
commit | a183eff03cef60840ed360b3c9fc750b923a0a6b (patch) | |
tree | ec1843c52080c0f13df5a6edb2eac0ff6294ecfd /js/panels/css-panel | |
parent | a447eaf48ffbaea89cbb229f06e8b5a7e199f77f (diff) | |
download | ninja-a183eff03cef60840ed360b3c9fc750b923a0a6b.tar.gz |
CSS Panel - Fix issue with wrong style value when re-enabling style.
Diffstat (limited to 'js/panels/css-panel')
-rw-r--r-- | js/panels/css-panel/style.reel/style.js | 3 | ||||
-rw-r--r-- | js/panels/css-panel/styles-view-delegate.js | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/js/panels/css-panel/style.reel/style.js b/js/panels/css-panel/style.reel/style.js index 1d5a11a5..858b7020 100644 --- a/js/panels/css-panel/style.reel/style.js +++ b/js/panels/css-panel/style.reel/style.js | |||
@@ -25,6 +25,9 @@ exports.Style = Montage.create(TreeNode, { | |||
25 | this.units = this.getUnits(text); | 25 | this.units = this.getUnits(text); |
26 | } | 26 | } |
27 | }, | 27 | }, |
28 | browserValue: { | ||
29 | value: null | ||
30 | }, | ||
28 | _priority: { value: "", distinct: true }, | 31 | _priority: { value: "", distinct: true }, |
29 | priority: { | 32 | priority: { |
30 | get: function() { | 33 | get: function() { |
diff --git a/js/panels/css-panel/styles-view-delegate.js b/js/panels/css-panel/styles-view-delegate.js index 7e0987eb..ec0026a1 100644 --- a/js/panels/css-panel/styles-view-delegate.js +++ b/js/panels/css-panel/styles-view-delegate.js | |||
@@ -94,7 +94,7 @@ exports.StylesViewMediator = Montage.create(Component, { | |||
94 | handleStyleToggle : { | 94 | handleStyleToggle : { |
95 | value: function(rule, enable, style) { | 95 | value: function(rule, enable, style) { |
96 | if(enable) { | 96 | if(enable) { |
97 | this.stylesController.setStyle(rule, style.propertyText, style.valueText, style.priority); | 97 | this.stylesController.setStyle(rule, style.propertyText, style.browserValue, style.priority); |
98 | } else { | 98 | } else { |
99 | this.stylesController.deleteStyle(rule, style.propertyText); | 99 | this.stylesController.deleteStyle(rule, style.propertyText); |
100 | } | 100 | } |
@@ -203,6 +203,7 @@ exports.StylesViewMediator = Montage.create(Component, { | |||
203 | 203 | ||
204 | ///// update value | 204 | ///// update value |
205 | browserValue = this.stylesController.setStyle(rule, property, value); | 205 | browserValue = this.stylesController.setStyle(rule, property, value); |
206 | style.browserValue = browserValue; | ||
206 | 207 | ||
207 | ///// Mark style as invalid if the browser doesn't accept it | 208 | ///// Mark style as invalid if the browser doesn't accept it |
208 | style.invalid = (browserValue === null); | 209 | style.invalid = (browserValue === null); |