aboutsummaryrefslogtreecommitdiff
path: root/js/panels/color
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-27 15:31:53 -0700
committerJose Antonio Marquez2012-06-27 15:31:53 -0700
commitf704705fd85c1af44ad86f8c29e8e93d330796e5 (patch)
tree612bd0744b9b0cd7ae8f55ff73a66b4c14d24cb2 /js/panels/color
parent9d7aaf42b4f0bcd3d6aa494bddd64519f1020abd (diff)
downloadninja-f704705fd85c1af44ad86f8c29e8e93d330796e5.tar.gz
Adding a dismiss step when switching popups
This is needed to allow for model to change during draw routines
Diffstat (limited to 'js/panels/color')
-rwxr-xr-xjs/panels/color/colorpanelbase.reel/colorpanelbase.js4
-rwxr-xr-xjs/panels/color/colorpopup-manager.js8
2 files changed, 10 insertions, 2 deletions
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
index db46ced7..40c384fb 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
@@ -1469,6 +1469,10 @@ exports.ColorPanelBase = Montage.create(Component, {
1469 } 1469 }
1470 } 1470 }
1471 } else { 1471 } else {
1472 if (this.colorManager.input === 'chip') {
1473 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
1474 return;
1475 }
1472 //TODO: Change popup to use montage's built in popup 1476 //TODO: Change popup to use montage's built in popup
1473 this.application.ninja.colorController.colorPopupManager.hideColorPopup(); 1477 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
1474 // 1478 //
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, {
192 if (this._popupBase && this._popupBase.opened) { 192 if (this._popupBase && this._popupBase.opened) {
193 //Toogles if called and opened 193 //Toogles if called and opened
194 this.hideColorPopup(); 194 this.hideColorPopup();
195 return;
195 } else { 196 } else {
196 this._colorPopupDrawing = true; 197 this._colorPopupDrawing = true;
197 //////////////////////////////////////////////////// 198 ////////////////////////////////////////////////////
@@ -373,7 +374,10 @@ exports.ColorPopupManager = Montage.create(Component, {
373 return; 374 return;
374 } 375 }
375 //Hidding other popup if opened 376 //Hidding other popup if opened
376 if (this._popupBase && this._popupBase.opened) this.hideColorPopup(); 377 if (this._popupBase && this._popupBase.opened) {
378 this.hideColorPopup();
379 return;
380 }
377 // 381 //
378 this._popupChipBtn = this.application.ninja.colorController.colorView.currentChip; 382 this._popupChipBtn = this.application.ninja.colorController.colorView.currentChip;
379 // 383 //
@@ -620,7 +624,7 @@ exports.ColorPopupManager = Montage.create(Component, {
620 } 624 }
621 this.colorChipChange(e); 625 this.colorChipChange(e);
622 } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'nocolor')) { 626 } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'nocolor')) {
623 this.colorChipChange(e); 627 this.colorChipChange(e);
624 } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'hex')) { 628 } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'hex')) {
625 this.colorChipChange(e); 629 this.colorChipChange(e);
626 } 630 }