aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/color/colorpopup-manager.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js
index c29e338b..644cb2fc 100755
--- a/js/panels/color/colorpopup-manager.js
+++ b/js/panels/color/colorpopup-manager.js
@@ -409,6 +409,8 @@ exports.ColorPopupManager = Montage.create(Component, {
409 // 409 //
410 if (e._event.srcElement.colorMode === 'gradient'){ 410 if (e._event.srcElement.colorMode === 'gradient'){
411 this._popupChipBase.colorManager.gradient = {value: e._event.srcElement.colorValue}; 411 this._popupChipBase.colorManager.gradient = {value: e._event.srcElement.colorValue};
412 } else {
413 this._popupChipBase.colorManager.gradient = null;
412 } 414 }
413 // 415 //
414 this._popupChipBase.addEventListener('change', this, false); 416 this._popupChipBase.addEventListener('change', this, false);
@@ -601,6 +603,7 @@ exports.ColorPopupManager = Montage.create(Component, {
601 // 603 //
602 handleChange: { 604 handleChange: {
603 value: function (e) { 605 value: function (e) {
606 //console.log(e);
604 if (this._popupChipBase && this._popupChipBase.opened && (!this._popupGradientChipBase || (this._popupGradientChipBase && !this._popupGradientChipBase.opened))) { 607 if (this._popupChipBase && this._popupChipBase.opened && (!this._popupGradientChipBase || (this._popupGradientChipBase && !this._popupGradientChipBase.opened))) {
605 if (e._event.hsv) { 608 if (e._event.hsv) {
606 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}; 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};
@@ -611,6 +614,9 @@ exports.ColorPopupManager = Montage.create(Component, {
611 this._popupChipBtn.color('gradient', e._event.gradient); 614 this._popupChipBtn.color('gradient', e._event.gradient);
612 this._popupChipBase._components.hex.value = null; 615 this._popupChipBase._components.hex.value = null;
613 } else if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) { 616 } else if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) {
617 if (!isNaN(e._target._numValue)) {
618 this._popupChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false};
619 }
614 this.colorChipChange(e); 620 this.colorChipChange(e);
615 } 621 }
616 } 622 }
@@ -624,10 +630,16 @@ exports.ColorPopupManager = Montage.create(Component, {
624 this._popupChipBtn.color('gradient', e._event.gradient); 630 this._popupChipBtn.color('gradient', e._event.gradient);
625 this._popupChipBase._components.hex.value = null; 631 this._popupChipBase._components.hex.value = null;
626 } else if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) { 632 } else if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) {
633 if (!isNaN(e._target._numValue)) {
634 this._popupGradientChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false};
635 }
627 this.colorGradientChipChange(e); 636 this.colorGradientChipChange(e);
628 } 637 }
629 } else { 638 } else {
630 if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) { 639 if (!isNaN(e._target._xStart) && !e._event.wasSetByCode) {
640 if (!isNaN(e._target._numValue)) {
641 this._popupGradientChipBase.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false};
642 }
631 this.colorGradientChipChange(e); 643 this.colorGradientChipChange(e);
632 } 644 }
633 } 645 }
@@ -645,7 +657,9 @@ exports.ColorPopupManager = Montage.create(Component, {
645 } else { 657 } else {
646 //this.colorChipChange(e); 658 //this.colorChipChange(e);
647 } 659 }
648 } 660 } else if (!isNaN(e._target._xStart) && !isNaN(e._target._numValue) && !e._event.wasSetByCode) {
661 this.colorManager.alpha = {value: e._target._numValue/100, type: 'change', wasSetByCode: false};
662 }
649 } 663 }
650 } 664 }
651 }, 665 },