diff options
Diffstat (limited to 'js/panels/color/colorpopup-manager.js')
-rwxr-xr-x | js/panels/color/colorpopup-manager.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js index 644cb2fc..91f776bd 100755 --- a/js/panels/color/colorpopup-manager.js +++ b/js/panels/color/colorpopup-manager.js | |||
@@ -291,12 +291,14 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
291 | } else { | 291 | } else { |
292 | this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: 1, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', 1)'}); | 292 | this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: 1, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', 1)'}); |
293 | } | 293 | } |
294 | } else { | 294 | } else if (!(e._event.mode && e._event.mode === 'nocolor')) { |
295 | if (alpha) { | 295 | if (alpha) { |
296 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'}); | 296 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'}); |
297 | } else { | 297 | } else { |
298 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: 1, css: 'rgba(255, 255, 255, 1)'}); | 298 | this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: 1, css: 'rgba(255, 255, 255, 1)'}); |
299 | } | 299 | } |
300 | } else { | ||
301 | this._popupChipBtn.color('nocolor', null); | ||
300 | } | 302 | } |
301 | } | 303 | } |
302 | }, | 304 | }, |
@@ -603,7 +605,6 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
603 | // | 605 | // |
604 | handleChange: { | 606 | handleChange: { |
605 | value: function (e) { | 607 | value: function (e) { |
606 | //console.log(e); | ||
607 | if (this._popupChipBase && this._popupChipBase.opened && (!this._popupGradientChipBase || (this._popupGradientChipBase && !this._popupGradientChipBase.opened))) { | 608 | if (this._popupChipBase && this._popupChipBase.opened && (!this._popupGradientChipBase || (this._popupGradientChipBase && !this._popupGradientChipBase.opened))) { |
608 | if (e._event.hsv) { | 609 | if (e._event.hsv) { |
609 | this._popupChipBase.colorManager.hsv = {h: e._event.hsv.h, s: e._event.hsv.s, v: e._event.hsv.v, type: e._event.type, wasSetByCode: e._event.wasSetByCode}; | 610 | this._popupChipBase.colorManager.hsv = {h: e._event.hsv.h, s: e._event.hsv.s, v: e._event.hsv.v, type: e._event.type, wasSetByCode: e._event.wasSetByCode}; |
@@ -618,6 +619,8 @@ exports.ColorPopupManager = Montage.create(Component, { | |||
618 | this._popupChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; | 619 | this._popupChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false}; |
619 | } | 620 | } |
620 | this.colorChipChange(e); | 621 | this.colorChipChange(e); |
622 | } else if (!e._event.wasSetByCode && (e._event.mode && e._event.mode === 'nocolor')) { | ||
623 | this.colorChipChange(e); | ||
621 | } | 624 | } |
622 | } | 625 | } |
623 | return; | 626 | return; |