aboutsummaryrefslogtreecommitdiff
path: root/js/panels/color/colorpanelbase.reel/colorpanelbase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/color/colorpanelbase.reel/colorpanelbase.js')
-rwxr-xr-xjs/panels/color/colorpanelbase.reel/colorpanelbase.js66
1 files changed, 33 insertions, 33 deletions
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
index a3525d0f..b7fbb859 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
@@ -559,7 +559,7 @@ exports.ColorPanelBase = Montage.create(Component, {
559 this.drawButtonNoColor(button, button.getElementsByTagName('canvas')[0]); 559 this.drawButtonNoColor(button, button.getElementsByTagName('canvas')[0]);
560 } 560 }
561 break; 561 break;
562 //////////////////////////////////////////////////////// 562 ////////////////////////////////////////////////////////
563 case 'fillicon': 563 case 'fillicon':
564 button.innerHTML = ''; 564 button.innerHTML = '';
565 this._buttons.fill.push(button); 565 this._buttons.fill.push(button);
@@ -572,7 +572,7 @@ exports.ColorPanelBase = Montage.create(Component, {
572 button.className = button.className + ' selected'; 572 button.className = button.className + ' selected';
573 } 573 }
574 break; 574 break;
575 //////////////////////////////////////////////////////// 575 ////////////////////////////////////////////////////////
576 case 'stroke': 576 case 'stroke':
577 this._buttons.stroke.push(button); 577 this._buttons.stroke.push(button);
578 button.style.cursor = 'pointer'; 578 button.style.cursor = 'pointer';
@@ -602,7 +602,7 @@ exports.ColorPanelBase = Montage.create(Component, {
602 //this.selectInputHighlight(this._buttons['stroke'], this._buttons['fill'], false, true); 602 //this.selectInputHighlight(this._buttons['stroke'], this._buttons['fill'], false, true);
603 } 603 }
604 break; 604 break;
605 //////////////////////////////////////////////////////// 605 ////////////////////////////////////////////////////////
606 case 'strokeicon': 606 case 'strokeicon':
607 button.innerHTML = ''; 607 button.innerHTML = '';
608 this._buttons.stroke.push(button); 608 this._buttons.stroke.push(button);
@@ -615,7 +615,7 @@ exports.ColorPanelBase = Montage.create(Component, {
615 button.className = button.className + ' selected'; 615 button.className = button.className + ' selected';
616 } 616 }
617 break; 617 break;
618 //////////////////////////////////////////////////////// 618 ////////////////////////////////////////////////////////
619 case 'current': 619 case 'current':
620 this._buttons.current.push(button); 620 this._buttons.current.push(button);
621 button.style.cursor = 'default'; 621 button.style.cursor = 'default';
@@ -636,7 +636,7 @@ exports.ColorPanelBase = Montage.create(Component, {
636 } 636 }
637 } 637 }
638 break; 638 break;
639 //////////////////////////////////////////////////////// 639 ////////////////////////////////////////////////////////
640 case 'previous': 640 case 'previous':
641 this._buttons.previous.push(button); 641 this._buttons.previous.push(button);
642 button.addEventListener('click', this.setPreviousColor.bind(this)); 642 button.addEventListener('click', this.setPreviousColor.bind(this));
@@ -657,49 +657,49 @@ exports.ColorPanelBase = Montage.create(Component, {
657 } 657 }
658 } 658 }
659 break; 659 break;
660 //////////////////////////////////////////////////////// 660 ////////////////////////////////////////////////////////
661 case 'mlabel1': 661 case 'mlabel1':
662 this._buttons.mlabel1.push(button); 662 this._buttons.mlabel1.push(button);
663 break; 663 break;
664 //////////////////////////////////////////////////////// 664 ////////////////////////////////////////////////////////
665 case 'mlabel2': 665 case 'mlabel2':
666 this._buttons.mlabel2.push(button); 666 this._buttons.mlabel2.push(button);
667 break; 667 break;
668 //////////////////////////////////////////////////////// 668 ////////////////////////////////////////////////////////
669 case 'mlabel3': 669 case 'mlabel3':
670 this._buttons.mlabel3.push(button); 670 this._buttons.mlabel3.push(button);
671 break; 671 break;
672 //////////////////////////////////////////////////////// 672 ////////////////////////////////////////////////////////
673 case 'rgbmode': 673 case 'rgbmode':
674 this._buttons.rgbmode.push(button); 674 this._buttons.rgbmode.push(button);
675 button.title = 'Color Mode: RGB'; 675 button.title = 'Color Mode: RGB';
676 button.addEventListener('click', this.rgbMode.bind(this)); 676 button.addEventListener('click', this.rgbMode.bind(this));
677 break; 677 break;
678 //////////////////////////////////////////////////////// 678 ////////////////////////////////////////////////////////
679 case 'hslmode': 679 case 'hslmode':
680 this._buttons.hslmode.push(button); 680 this._buttons.hslmode.push(button);
681 button.title = 'Color Mode: HSL'; 681 button.title = 'Color Mode: HSL';
682 button.addEventListener('click', this.hslMode.bind(this)); 682 button.addEventListener('click', this.hslMode.bind(this));
683 break; 683 break;
684 //////////////////////////////////////////////////////// 684 ////////////////////////////////////////////////////////
685 case 'reset': 685 case 'reset':
686 this._buttons.reset.push(button); 686 this._buttons.reset.push(button);
687 button.title = 'Default Colors'; 687 button.title = 'Default Colors';
688 button.addEventListener('click', this.applyDefaultColors.bind(this)); 688 button.addEventListener('click', this.applyDefaultColors.bind(this));
689 break; 689 break;
690 //////////////////////////////////////////////////////// 690 ////////////////////////////////////////////////////////
691 case 'nocolor': 691 case 'nocolor':
692 this._buttons.nocolor.push(button); 692 this._buttons.nocolor.push(button);
693 button.title = 'No Color'; 693 button.title = 'No Color';
694 button.addEventListener('click', function () {this.setNoColor(false)}.bind(this)); 694 button.addEventListener('click', function () {this.setNoColor(false)}.bind(this));
695 break; 695 break;
696 //////////////////////////////////////////////////////// 696 ////////////////////////////////////////////////////////
697 case 'swap': 697 case 'swap':
698 this._buttons.swap.push(button); 698 this._buttons.swap.push(button);
699 button.title = 'Swap Colors'; 699 button.title = 'Swap Colors';
700 button.addEventListener('click', this.swapColors.bind(this)); 700 button.addEventListener('click', this.swapColors.bind(this));
701 break; 701 break;
702 //////////////////////////////////////////////////////// 702 ////////////////////////////////////////////////////////
703 case 'hexinput': 703 case 'hexinput':
704 var hexinp = HotText.create(); 704 var hexinp = HotText.create();
705 hexinp.element = button; 705 hexinp.element = button;
@@ -709,7 +709,7 @@ exports.ColorPanelBase = Montage.create(Component, {
709 this._buttons.hexinput.push(hexinp); 709 this._buttons.hexinput.push(hexinp);
710 return hexinp; 710 return hexinp;
711 break; 711 break;
712 //////////////////////////////////////////////////////// 712 ////////////////////////////////////////////////////////
713 default: 713 default:
714 console.log("ERROR: An error occured, the button '" + button + "' has an invalid type of " + type + "."); 714 console.log("ERROR: An error occured, the button '" + button + "' has an invalid type of " + type + ".");
715 break; 715 break;
@@ -768,7 +768,7 @@ exports.ColorPanelBase = Montage.create(Component, {
768 this._updateSliders(e); 768 this._updateSliders(e);
769 for (i = 0; this._buttons.rgbmode[i]; i++) { 769 for (i = 0; this._buttons.rgbmode[i]; i++) {
770 this._buttons.rgbmode[i].className = 'cp_rgb_mode selected'; 770 this._buttons.rgbmode[i].className = 'cp_rgb_mode selected';
771 //this._buttons.rgbmode[i].classList.add('selected'); 771 //this._buttons.rgbmode[i].classList.add('selected');
772 } 772 }
773 for (i = 0; this._buttons.hslmode[i]; i++) { 773 for (i = 0; this._buttons.hslmode[i]; i++) {
774 this._buttons.hslmode[i].className = 'cp_hsl_mode'; 774 this._buttons.hslmode[i].className = 'cp_hsl_mode';
@@ -808,7 +808,7 @@ exports.ColorPanelBase = Montage.create(Component, {
808 } 808 }
809 for (i = 0; this._buttons.hslmode[i]; i++) { 809 for (i = 0; this._buttons.hslmode[i]; i++) {
810 this._buttons.hslmode[i].className = 'cp_hsl_mode selected'; 810 this._buttons.hslmode[i].className = 'cp_hsl_mode selected';
811 //this._buttons.hslmode[i].classList.add('selected'); 811 //this._buttons.hslmode[i].classList.add('selected');
812 } 812 }
813 for (i = 0; this._buttons.mlabel1[i]; i++) { 813 for (i = 0; this._buttons.mlabel1[i]; i++) {
814 this._buttons.mlabel1[i].innerHTML = 'H'; 814 this._buttons.mlabel1[i].innerHTML = 'H';
@@ -848,31 +848,31 @@ exports.ColorPanelBase = Montage.create(Component, {
848 this.colorManager.alpha = { value: stroke.a, type: 'change', wasSetByCode: false }; 848 this.colorManager.alpha = { value: stroke.a, type: 'change', wasSetByCode: false };
849 // 849 //
850 switch (stroke.m) { 850 switch (stroke.m) {
851 //////////////////////////////////////////////////////// 851 ////////////////////////////////////////////////////////
852 case 'rgb': 852 case 'rgb':
853 this.colorManager.rgb = stroke.c; 853 this.colorManager.rgb = stroke.c;
854 break; 854 break;
855 //////////////////////////////////////////////////////// 855 ////////////////////////////////////////////////////////
856 case 'hsv': 856 case 'hsv':
857 this.colorManager.hsv = stroke.c; 857 this.colorManager.hsv = stroke.c;
858 break; 858 break;
859 //////////////////////////////////////////////////////// 859 ////////////////////////////////////////////////////////
860 case 'hsl': 860 case 'hsl':
861 this.colorManager.hsl = stroke.c; 861 this.colorManager.hsl = stroke.c;
862 break; 862 break;
863 //////////////////////////////////////////////////////// 863 ////////////////////////////////////////////////////////
864 case 'hex': 864 case 'hex':
865 this.colorManager.hex = stroke.c; 865 this.colorManager.hex = stroke.c;
866 break;