From fbd9d2492aeaef392ad59792825b8757d6c363fc Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 15 Jun 2012 15:14:34 -0700 Subject: Fixing apply 'no color' This should fix canvas and standard DOM elements including the root (body or template wrapper). --- js/controllers/color-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/controllers') diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js index d4737aad..3edaff86 100755 --- a/js/controllers/color-controller.js +++ b/js/controllers/color-controller.js @@ -198,7 +198,7 @@ exports.ColorController = Montage.create(Component, { enumerable: true, value: function (e) { // - var actionEvent, color, input = e._event.input, panelMode, mode = e._event.mode; + var color, input = e._event.input, panelMode, mode = e._event.mode; if (this.colorView) { panelMode = this.colorView.panelMode; } -- cgit v1.2.3 From d5aec31ee519069ff6120e5d5685828750501e67 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 16 Jun 2012 19:04:13 -0700 Subject: More cleaning up Controller will need a review and refactoring. --- js/controllers/color-controller.js | 48 +++++++------------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js index 3edaff86..3165988d 100755 --- a/js/controllers/color-controller.js +++ b/js/controllers/color-controller.js @@ -19,13 +19,11 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // hasTemplate: { - enumerable: true, value: false }, //////////////////////////////////////////////////////////////////// // deserializedFromTemplate: { - enumerable: true, value: function () { //Setting up colorManager in other classes this.colorPanelBase.colorManager = this.colorModel; @@ -38,60 +36,47 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // colorModel: { - enumerable: true, value: ColorModel }, //////////////////////////////////////////////////////////////////// // colorPanelBase: { - enumerable: true, value: ColorPanelBase }, //////////////////////////////////////////////////////////////////// // colorPopupManager: { - enumerable: true, value: ColorPopupManager }, //////////////////////////////////////////////////////////////////// // colorButtonManager: { - enumerable: true, value: ColorPopupManager }, //////////////////////////////////////////////////////////////////// // colorView: { - enumerable: true, value: null }, //////////////////////////////////////////////////////////////////// // colorToolbar: { - enumerable: true, value: null }, //////////////////////////////////////////////////////////////////// // _popupTab: { - enumerable: false, value: 'wheel' }, //////////////////////////////////////////////////////////////////// // popupTab: { - enumerable: true, - get: function() { - return this._popupTab; - }, - set: function(value) { - this._popupTab = value.toLowerCase(); - } + get: function() {return this._popupTab;}, + set: function(value) {this._popupTab = value.toLowerCase();} }, //////////////////////////////////////////////////////////////////// // addButton: { - enumerable: true, value: function (type, button) { if (this.colorView) { this.colorView.addButton(type, button); @@ -107,7 +92,6 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // removeButton: { - enumerable: true, value: function (type, button) { if (this.colorView) { this.colorView.removeButton(type, button); @@ -123,41 +107,28 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // _fill: { - enumerable: false, value: null }, //////////////////////////////////////////////////////////////////// // fill: { - enumerable: true, - get: function() { - return this._fill; - }, - set: function(value) { - this._fill = value; - } + get: function() {return this._fill;}, + set: function(value) {this._fill = value;} }, //////////////////////////////////////////////////////////////////// // _stroke: { - enumerable: false, value: null }, //////////////////////////////////////////////////////////////////// // stroke: { - enumerable: true, - get: function() { - return this._stroke; - }, - set: function(value) { - this._stroke = value; - } + get: function() {return this._stroke;}, + set: function(value) {this._stroke = value;} }, //////////////////////////////////////////////////////////////////// // getBackground: { - enumerable: true, value: function (element) { //TODO: Return object with all background properties console.log(ElementsMediator.getProperty(element, 'background-color')); @@ -167,7 +138,6 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // getBorder: { - enumerable: true, value: function (element) { } @@ -175,7 +145,6 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // setColor: { - enumerable: true, value: function (mode, color, isFill, selection) { var elements; //The selection is optional, if none, it asks for the currently selected elements @@ -195,7 +164,6 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// // handleChange: { - enumerable: true, value: function (e) { // var color, input = e._event.input, panelMode, mode = e._event.mode; @@ -244,7 +212,6 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// //Converts CSS to a color object to be used by the color model getColorObjFromCss: { - enumerable: true, value: function (css) { // var color, arr, i, j, temp, c, gradient; @@ -341,7 +308,6 @@ exports.ColorController = Montage.create(Component, { //////////////////////////////////////////////////////////////////// //Parses simple solid CSS string into color object parseCssToColor: { - enumerable: true, value: function (css) { var color, r, p; //Parsing string and converting into color object @@ -368,4 +334,6 @@ exports.ColorController = Montage.create(Component, { return color; } } + //////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////// }); \ No newline at end of file -- cgit v1.2.3