From 13da56e791b7478ad3dbb8162a583a6b2c8c4b6b Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 18 May 2012 17:27:31 -0700 Subject: 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. --- js/panels/css-panel/css-style.reel/css-style.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/panels/css-panel/css-style.reel/css-style.js') 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, { editNewEmptyClass : { value: 'edit-empty-style' }, invalidStyleClass : { value: "style-item-invalid" }, emptyStyleClass : { value: "empty-css-style" }, + source : { value: null }, propertyText : { value: "property", @@ -29,6 +30,10 @@ exports.CssStyle = Montage.create(Component, { return this._valueText; }, set: function(text) { + /// TODO: Figure out why montage is trying to set this to undefined + /// TODO: when the style object is removed from the repetition + if(text === null || text === undefined) { return; } + this._valueText = this.browserValue = text; this.units = this.getUnits(text); } -- cgit v1.2.3