diff options
author | Kris Kowal | 2012-07-09 16:38:08 -0700 |
---|---|---|
committer | Kris Kowal | 2012-07-09 16:38:08 -0700 |
commit | 7bee50379c1df86bb571e0e8d6c08e24d25231f5 (patch) | |
tree | 5b11abd0414e0a3ab50ec6276b6334fbd168db7e /js/panels/color/colorpanelbase.reel | |
parent | 26d4b5ce30e6e0ea6e0fde870853c1e2a673a7b4 (diff) | |
download | ninja-7bee50379c1df86bb571e0e8d6c08e24d25231f5.tar.gz |
BSD License
Diffstat (limited to 'js/panels/color/colorpanelbase.reel')
4 files changed, 81 insertions, 77 deletions
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.html b/js/panels/color/colorpanelbase.reel/colorpanelbase.html index 5918a3ae..d7b26ca7 100755 --- a/js/panels/color/colorpanelbase.reel/colorpanelbase.html +++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.html | |||
@@ -1,25 +1,26 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <!-- <copyright> | 2 | <!-- <copyright> |
3 | Copyright (c) 2012, Motorola Mobility, Inc | 3 | Copyright (c) 2012, Motorola Mobility LLC. |
4 | All Rights Reserved. | 4 | All Rights Reserved. |
5 | BSD License. | ||
6 | 5 | ||
7 | Redistribution and use in source and binary forms, with or without | 6 | Redistribution and use in source and binary forms, with or without |
8 | modification, are permitted provided that the following conditions are met: | 7 | modification, are permitted provided that the following conditions are met: |
9 | 8 | ||
10 | - Redistributions of source code must retain the above copyright notice, | 9 | * Redistributions of source code must retain the above copyright notice, |
11 | this list of conditions and the following disclaimer. | 10 | this list of conditions and the following disclaimer. |
12 | - Redistributions in binary form must reproduce the above copyright | 11 | |
13 | notice, this list of conditions and the following disclaimer in the | 12 | * Redistributions in binary form must reproduce the above copyright notice, |
14 | documentation and/or other materials provided with the distribution. | 13 | this list of conditions and the following disclaimer in the documentation |
15 | - Neither the name of Motorola Mobility nor the names of its contributors | 14 | and/or other materials provided with the distribution. |
16 | may be used to endorse or promote products derived from this software | 15 | |
17 | without specific prior written permission. | 16 | * Neither the name of Motorola Mobility LLC nor the names of its |
17 | contributors may be used to endorse or promote products derived from this | ||
18 | software without specific prior written permission. | ||
18 | 19 | ||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js index 0223b9d8..15990506 100755 --- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js +++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js | |||
@@ -1,24 +1,25 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | Copyright (c) 2012, Motorola Mobility, Inc | 2 | Copyright (c) 2012, Motorola Mobility LLC. |
3 | All Rights Reserved. | 3 | All Rights Reserved. |
4 | BSD License. | ||
5 | 4 | ||
6 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met: | 6 | modification, are permitted provided that the following conditions are met: |
8 | 7 | ||
9 | - Redistributions of source code must retain the above copyright notice, | 8 | * Redistributions of source code must retain the above copyright notice, |
10 | this list of conditions and the following disclaimer. | 9 | this list of conditions and the following disclaimer. |
11 | - Redistributions in binary form must reproduce the above copyright | 10 | |
12 | notice, this list of conditions and the following disclaimer in the | 11 | * Redistributions in binary form must reproduce the above copyright notice, |
13 | documentation and/or other materials provided with the distribution. | 12 | this list of conditions and the following disclaimer in the documentation |
14 | - Neither the name of Motorola Mobility nor the names of its contributors | 13 | and/or other materials provided with the distribution. |
15 | may be used to endorse or promote products derived from this software | 14 | |
16 | without specific prior written permission. | 15 | * Neither the name of Motorola Mobility LLC nor the names of its |
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
17 | 18 | ||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
@@ -559,7 +560,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
559 | this.drawButtonNoColor(button, button.getElementsByTagName('canvas')[0]); | 560 | this.drawButtonNoColor(button, button.getElementsByTagName('canvas')[0]); |
560 | } | 561 | } |
561 | break; | 562 | break; |
562 | //////////////////////////////////////////////////////// | 563 | //////////////////////////////////////////////////////// |
563 | case 'fillicon': | 564 | case 'fillicon': |
564 | button.innerHTML = ''; | 565 | button.innerHTML = ''; |
565 | this._buttons.fill.push(button); | 566 | this._buttons.fill.push(button); |
@@ -572,7 +573,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
572 | button.className = button.className + ' selected'; | 573 | button.className = button.className + ' selected'; |
573 | } | 574 | } |
574 | break; | 575 | break; |
575 | //////////////////////////////////////////////////////// | 576 | //////////////////////////////////////////////////////// |
576 | case 'stroke': | 577 | case 'stroke': |
577 | this._buttons.stroke.push(button); | 578 | this._buttons.stroke.push(button); |
578 | button.style.cursor = 'pointer'; | 579 | button.style.cursor = 'pointer'; |
@@ -602,7 +603,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
602 | //this.selectInputHighlight(this._buttons['stroke'], this._buttons['fill'], false, true); | 603 | //this.selectInputHighlight(this._buttons['stroke'], this._buttons['fill'], false, true); |
603 | } | 604 | } |
604 | break; | 605 | break; |
605 | //////////////////////////////////////////////////////// | 606 | //////////////////////////////////////////////////////// |
606 | case 'strokeicon': | 607 | case 'strokeicon': |
607 | button.innerHTML = ''; | 608 | button.innerHTML = ''; |
608 | this._buttons.stroke.push(button); | 609 | this._buttons.stroke.push(button); |
@@ -615,7 +616,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
615 | button.className = button.className + ' selected'; | 616 | button.className = button.className + ' selected'; |
616 | } | 617 | } |
617 | break; | 618 | break; |
618 | //////////////////////////////////////////////////////// | 619 | //////////////////////////////////////////////////////// |
619 | case 'current': | 620 | case 'current': |
620 | this._buttons.current.push(button); | 621 | this._buttons.current.push(button); |
621 | button.style.cursor = 'default'; | 622 | button.style.cursor = 'default'; |
@@ -636,7 +637,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
636 | } | 637 | } |
637 | } | 638 | } |
638 | break; | 639 | break; |
639 | //////////////////////////////////////////////////////// | 640 | //////////////////////////////////////////////////////// |
640 | case 'previous': | 641 | case 'previous': |
641 | this._buttons.previous.push(button); | 642 | this._buttons.previous.push(button); |
642 | button.addEventListener('click', this.setPreviousColor.bind(this)); | 643 | button.addEventListener('click', this.setPreviousColor.bind(this)); |
@@ -657,49 +658,49 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
657 | } | 658 | } |
658 | } | 659 | } |
659 | break; | 660 | break; |
660 | //////////////////////////////////////////////////////// | 661 | //////////////////////////////////////////////////////// |
661 | case 'mlabel1': | 662 | case 'mlabel1': |
662 | this._buttons.mlabel1.push(button); | 663 | this._buttons.mlabel1.push(button); |
663 | break; | 664 | break; |
664 | //////////////////////////////////////////////////////// | 665 | //////////////////////////////////////////////////////// |
665 | case 'mlabel2': | 666 | case 'mlabel2': |
666 | this._buttons.mlabel2.push(button); | 667 | this._buttons.mlabel2.push(button); |
667 | break; | 668 | break; |
668 | //////////////////////////////////////////////////////// | 669 | //////////////////////////////////////////////////////// |
669 | case 'mlabel3': | 670 | case 'mlabel3': |
670 | this._buttons.mlabel3.push(button); | 671 | this._buttons.mlabel3.push(button); |
671 | break; | 672 | break; |
672 | //////////////////////////////////////////////////////// | 673 | //////////////////////////////////////////////////////// |
673 | case 'rgbmode': | 674 | case 'rgbmode': |
674 | this._buttons.rgbmode.push(button); | 675 | this._buttons.rgbmode.push(button); |
675 | button.title = 'Color Mode: RGB'; | 676 | button.title = 'Color Mode: RGB'; |
676 | button.addEventListener('click', this.rgbMode.bind(this)); | 677 | button.addEventListener('click', this.rgbMode.bind(this)); |
677 | break; | 678 | break; |
678 | //////////////////////////////////////////////////////// | 679 | //////////////////////////////////////////////////////// |
679 | case 'hslmode': | 680 | case 'hslmode': |
680 | this._buttons.hslmode.push(button); | 681 | this._buttons.hslmode.push(button); |
681 | button.title = 'Color Mode: HSL'; | 682 | button.title = 'Color Mode: HSL'; |
682 | button.addEventListener('click', this.hslMode.bind(this)); | 683 | button.addEventListener('click', this.hslMode.bind(this)); |
683 | break; | 684 | break; |
684 | //////////////////////////////////////////////////////// | 685 | //////////////////////////////////////////////////////// |
685 | case 'reset': | 686 | case 'reset': |
686 | this._buttons.reset.push(button); | 687 | this._buttons.reset.push(button); |
687 | button.title = 'Default Colors'; | 688 | button.title = 'Default Colors'; |
688 | button.addEventListener('click', this.applyDefaultColors.bind(this)); | 689 | button.addEventListener('click', |