aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Guzman2012-05-16 14:59:43 -0700
committerEric Guzman2012-05-16 14:59:43 -0700
commit62a47c22cf5fb76289a50be8e73de1ae8c55c78f (patch)
tree7a42fc4e4c24355f50f813d04245c041d46c2b76
parentbbca3e05b39d43ce13c2f3e48cb33630ed7948b9 (diff)
downloadninja-62a47c22cf5fb76289a50be8e73de1ae8c55c78f.tar.gz
CSS Panel - Fix toggling style on/off.
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.js3
-rw-r--r--js/panels/css-panel/styles-view-delegate.js9
2 files changed, 1 insertions, 11 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 face668e..61723284 100644
--- a/js/panels/css-panel/css-style.reel/css-style.js
+++ b/js/panels/css-panel/css-style.reel/css-style.js
@@ -22,7 +22,7 @@ exports.CssStyle = Montage.create(Component, {
22 return this._valueText; 22 return this._valueText;
23 }, 23 },
24 set: function(text) { 24 set: function(text) {
25 this._valueText = text; 25 this._valueText = this.browserValue = text;
26 this.units = this.getUnits(text); 26 this.units = this.getUnits(text);
27 } 27 }
28 }, 28 },
@@ -315,7 +315,6 @@ exports.CssStyle = Montage.create(Component, {
315 315
316 prepareForDraw : { 316 prepareForDraw : {
317 value: function() { 317 value: function() {
318 console.log("style's prepare for draw");
319 this.element.addEventListener('dragstart', this, false); 318 this.element.addEventListener('dragstart', this, false);
320 this.element.addEventListener('drag', this, false); 319 this.element.addEventListener('drag', this, false);
321 this.element.addEventListener('dragend', this, false); 320 this.element.addEventListener('dragend', this, false);
diff --git a/js/panels/css-panel/styles-view-delegate.js b/js/panels/css-panel/styles-view-delegate.js
index 0b09f2a6..04d0ca09 100644
--- a/js/panels/css-panel/styles-view-delegate.js
+++ b/js/panels/css-panel/styles-view-delegate.js
@@ -78,7 +78,6 @@ exports.StylesViewMediator = Montage.create(Component, {
78 ///// Enable/Disable Style when checkbox is clicked 78 ///// Enable/Disable Style when checkbox is clicked
79 handleStyleToggle : { 79 handleStyleToggle : {
80 value: function(rule, enable, style) { 80 value: function(rule, enable, style) {
81 debugger;
82 if(enable) { 81 if(enable) {
83 this.stylesController.setStyle(rule, style.propertyText, style.browserValue, style.priority); 82 this.stylesController.setStyle(rule, style.propertyText, style.browserValue, style.priority);
84 } else { 83 } else {
@@ -93,8 +92,6 @@ exports.StylesViewMediator = Montage.create(Component, {
93 value: function(e, style) { 92 value: function(e, style) {
94 var key, nextFocus; 93 var key, nextFocus;
95 94
96 console.log("Handle Style Stop");
97
98 if(e._event.detail.type === 'keydown') { 95 if(e._event.detail.type === 'keydown') {
99 key = e._event.detail.keyCode; 96 key = e._event.detail.keyCode;
100 97
@@ -114,8 +111,6 @@ exports.StylesViewMediator = Montage.create(Component, {
114 handleValueStop: { 111 handleValueStop: {
115 value: function(e, style) { 112 value: function(e, style) {
116 var key, nextFocus; 113 var key, nextFocus;
117 console.log("Handle Value Stop");
118 console.log("Editing new style: ", style.editingNewStyle);
119 114
120 if(e._event.detail.type === 'keydown') { 115 if(e._event.detail.type === 'keydown') {
121 key = e._event.detail.keyCode; 116 key = e._event.detail.keyCode;
@@ -163,8 +158,6 @@ exports.StylesViewMediator = Montage.create(Component, {
163 ///// Mark style as invalid if the browser doesn't accept it 158 ///// Mark style as invalid if the browser doesn't accept it
164 style.invalid = (browserValue === null); 159 style.invalid = (browserValue === null);
165 160
166 console.log("BrowserValue: ", browserValue, rule);
167
168 this._dispatchChange(property, browserValue); 161 this._dispatchChange(property, browserValue);
169 } 162 }
170 }, 163 },
@@ -195,8 +188,6 @@ exports.StylesViewMediator = Montage.create(Component, {
195 ///// Mark style as invalid if the browser doesn't accept it 188 ///// Mark style as invalid if the browser doesn't accept it
196 style.invalid = (browserValue === null); 189 style.invalid = (browserValue === null);
197 190
198 console.log("BrowserValue: ", browserValue, rule);
199
200 this._dispatchChange(property, browserValue); 191 this._dispatchChange(property, browserValue);
201 192
202 if(style.editingNewStyle) { 193 if(style.editingNewStyle) {