From f704705fd85c1af44ad86f8c29e8e93d330796e5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 27 Jun 2012 15:31:53 -0700 Subject: Adding a dismiss step when switching popups This is needed to allow for model to change during draw routines --- js/panels/color/colorpopup-manager.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'js/panels/color/colorpopup-manager.js') diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js index d5cc8ac8..493cb801 100755 --- a/js/panels/color/colorpopup-manager.js +++ b/js/panels/color/colorpopup-manager.js @@ -192,6 +192,7 @@ exports.ColorPopupManager = Montage.create(Component, { if (this._popupBase && this._popupBase.opened) { //Toogles if called and opened this.hideColorPopup(); + return; } else { this._colorPopupDrawing = true; //////////////////////////////////////////////////// @@ -373,7 +374,10 @@ exports.ColorPopupManager = Montage.create(Component, { return; } //Hidding other popup if opened - if (this._popupBase && this._popupBase.opened) this.hideColorPopup(); + if (this._popupBase && this._popupBase.opened) { + this.hideColorPopup(); + return; + } // this._popupChipBtn = this.application.ninja.colorController.colorView.currentChip; // @@ -620,7 +624,7 @@ exports.ColorPopupManager = Montage.create(Component, { } this.colorChipChange(e); } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'nocolor')) { - this.colorChipChange(e); + this.colorChipChange(e); } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'hex')) { this.colorChipChange(e); } -- cgit v1.2.3