From 5cd0ec9be1de5014c227118333be8ec596e908bd Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 27 Jun 2012 17:27:17 -0700 Subject: Fixing history bug --- js/panels/color/colorpanelbase.reel/colorpanelbase.js | 8 ++++---- js/panels/color/colorpopup-manager.js | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'js/panels') diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js index 7208c2da..24eb86ea 100755 --- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js +++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js @@ -1421,6 +1421,10 @@ exports.ColorPanelBase = Montage.create(Component, { // selectInputType: { value: function (type) { + if (this.colorManager.input === 'chip') { + this.application.ninja.colorController.colorPopupManager.hideColorPopup(); + return; + } //Checking for the type to be formatted as expected, otherwise we unselected all buttons try { type._event.srcElement.inputType; @@ -1452,10 +1456,6 @@ exports.ColorPanelBase = Montage.create(Component, { } else if (input === 'fill') { other = 'stroke'; } - if (this.colorManager.input === 'chip') { - this.application.ninja.colorController.colorPopupManager.hideColorPopup(); - return; - } //TODO: Change popup to use montage's built in popup if (this.colorManager.input === input) { // diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js index 493cb801..5b20fbf8 100755 --- a/js/panels/color/colorpopup-manager.js +++ b/js/panels/color/colorpopup-manager.js @@ -412,6 +412,7 @@ exports.ColorPopupManager = Montage.create(Component, { this._popupChipBase.props.source = e._event.srcElement; // this._popupChipBase.colorManager = ColorModel.create(); + this._popupChipBase.colorManager.input = 'chip'; // if (e._event.srcElement.colorMode === 'gradient'){ this._popupChipBase.colorManager.gradient = {value: e._event.srcElement.colorValue}; @@ -497,6 +498,7 @@ exports.ColorPopupManager = Montage.create(Component, { this._popupGradientChipBase.props.source = e._event.srcElement; // this._popupGradientChipBase.colorManager = ColorModel.create(); + this._popupGradientChipBase.colorManager.input = 'chip'; // this._popupGradientChipBase.addEventListener('change', this, false); this._popupGradientChipBase.addEventListener('changing', this, false); -- cgit v1.2.3