aboutsummaryrefslogtreecommitdiff
path: root/js/panels/color/colorpanelbase.reel/colorpanelbase.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 14:35:44 -0700
committerValerio Virgillito2012-07-09 14:35:44 -0700
commit84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch)
tree3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/panels/color/colorpanelbase.reel/colorpanelbase.js
parentc0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff)
parent40c6eb2c06b34f65a74d59ef9687251952858bab (diff)
downloadninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts: js/components/gradientpicker.reel/gradientpicker.js js/components/tools-properties/text-properties.reel/text-properties.js js/document/views/base.js js/document/views/design.js js/helper-classes/3D/StageLine.js js/helper-classes/3D/draw-utils.js js/lib/drawing/world.js js/lib/geom/circle.js js/lib/geom/line.js js/lib/geom/rectangle.js js/lib/geom/shape-primitive.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/flag-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/water-material.js js/panels/Materials/materials-library-panel.reel/materials-library-panel.html js/panels/Materials/materials-library-panel.reel/materials-library-panel.js js/panels/Materials/materials-popup.reel/materials-popup.html js/panels/Materials/materials-popup.reel/materials-popup.js js/tools/LineTool.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels/color/colorpanelbase.reel/colorpanelbase.js')
-rwxr-xr-xjs/panels/color/colorpanelbase.reel/colorpanelbase.js140
1 files changed, 70 insertions, 70 deletions
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
index 0223b9d8..b7fbb859 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
@@ -30,12 +30,12 @@ POSSIBILITY OF SUCH DAMAGE.
30 30
31//////////////////////////////////////////////////////////////////////// 31////////////////////////////////////////////////////////////////////////
32// 32//
33var Montage = require("montage/core/core").Montage, 33var Montage = require("montage/core/core").Montage,
34 Component = require("montage/ui/component").Component, 34 Component = require("montage/ui/component").Component,
35 Popup = require("js/components/popup.reel").Popup, 35 Popup = require("js/components/popup.reel").Popup,
36 Slider = require("js/components/slider.reel").Slider, 36 Slider = require("js/components/slider.reel").Slider,
37 HotText = require("js/components/hottext.reel").HotText, 37 HotText = require("js/components/hottext.reel").HotText,
38 ColorBar = require("js/components/colorbar.reel").ColorBar; 38 ColorBar = require("js/components/colorbar.reel").ColorBar;
39//////////////////////////////////////////////////////////////////////// 39////////////////////////////////////////////////////////////////////////
40//Exporting as ColorPanelBase 40//Exporting as ColorPanelBase
41exports.ColorPanelBase = Montage.create(Component, { 41exports.ColorPanelBase = Montage.create(Component, {
@@ -47,7 +47,7 @@ exports.ColorPanelBase = Montage.create(Component, {
47 //////////////////////////////////////////////////////////////////// 47 ////////////////////////////////////////////////////////////////////
48 //Storing ColorPanel sliders mode 48 //Storing ColorPanel sliders mode
49 _panelMode: { 49 _panelMode: {
50 value: 'rgb' 50 value: 'rgb'
51 }, 51 },
52 //////////////////////////////////////////////////////////////////// 52 ////////////////////////////////////////////////////////////////////
53 //Storing ColorPanel sliders mode 53 //Storing ColorPanel sliders mode
@@ -505,11 +505,11 @@ exports.ColorPanelBase = Montage.create(Component, {
505 if (c && c.css) { 505 if (c && c.css) {
506 this.ctx.clearRect(0, 0, this.cvs.width, this.cvs.height); 506 this.ctx.clearRect(0, 0, this.cvs.width, this.cvs.height);
507 if (m === 'gradient') { 507 if (m === 'gradient') {
508 this.style.backgroundImage = c.css; 508 this.style.backgroundImage = c.css;
509 this.style.backgroundColor = 'transparent'; 509 this.style.backgroundColor = 'transparent';
510 } else { 510 } else {
511 this.style.backgroundColor = c.css; 511 this.style.backgroundColor = c.css;
512 this.style.backgroundImage = 'none'; 512 this.style.backgroundImage = 'none';
513 } 513 }
514 } else { 514 } else {
515 this.drawNoColor(this, this.cvs); 515 this.drawNoColor(this, this.cvs);
@@ -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