aboutsummaryrefslogtreecommitdiff
path: root/js/panels/color
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/color')
-rwxr-xr-xjs/panels/color/colorchippopup.reel/colorchippopup.html2
-rwxr-xr-xjs/panels/color/colorpanelbase.reel/colorpanelbase.html2
-rwxr-xr-xjs/panels/color/colorpanelbase.reel/colorpanelbase.js2836
-rwxr-xr-xjs/panels/color/colorpanelpopup.reel/colorpanelpopup.html2
-rwxr-xr-xjs/panels/color/colorpopup-manager.js2
-rwxr-xr-xjs/panels/color/colortoolbar.reel/colortoolbar.html2
6 files changed, 1425 insertions, 1421 deletions
diff --git a/js/panels/color/colorchippopup.reel/colorchippopup.html b/js/panels/color/colorchippopup.reel/colorchippopup.html
index ff0c6498..cdb26894 100755
--- a/js/panels/color/colorchippopup.reel/colorchippopup.html
+++ b/js/panels/color/colorchippopup.reel/colorchippopup.html
@@ -28,7 +28,7 @@
28 28
29 <body> 29 <body>
30 30
31 <div id="cc_popup" class="cc_popup"> 31 <div data-montage-id="cc_popup" class="cc_popup">
32 <div id="cc_pu_options"> 32 <div id="cc_pu_options">
33 33
34 <div id="cc_pu_hex">#<input id="cc_pu_hottext_hex" class="cc_pu_hottext_hex" maxlength="6" /></div> 34 <div id="cc_pu_hex">#<input id="cc_pu_hottext_hex" class="cc_pu_hottext_hex" maxlength="6" /></div>
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.html b/js/panels/color/colorpanelbase.reel/colorpanelbase.html
index f40bd448..19bc4b6b 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.html
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.html
@@ -26,7 +26,7 @@
26 26
27 <body> 27 <body>
28 28
29 <div id="cp_expanded" class="cp_expanded"> 29 <div data-montage-id="cp_expanded" class="cp_expanded">
30 <div class="cp_history"> 30 <div class="cp_history">
31 <button class="cp_color_current">Current Color</button> 31 <button class="cp_color_current">Current Color</button>
32 <button class="cp_color_previous">Previous Color</button> 32 <button class="cp_color_previous">Previous Color</button>
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
index af62dd07..7a28c55d 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
@@ -15,35 +15,35 @@ var Montage = require("montage/core/core").Montage,
15//////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////
16//Exporting as ColorPanelBase 16//Exporting as ColorPanelBase
17exports.ColorPanelBase = Montage.create(Component, { 17exports.ColorPanelBase = Montage.create(Component, {
18 //////////////////////////////////////////////////////////////////// 18 ////////////////////////////////////////////////////////////////////
19 // 19 //
20 hasTemplate: { 20 hasTemplate: {
21 value: true 21 value: true
22 }, 22 },
23 //////////////////////////////////////////////////////////////////// 23 ////////////////////////////////////////////////////////////////////
24 //Storing ColorPanel sliders mode 24 //Storing ColorPanel sliders mode
25 _panelMode: { 25 _panelMode: {
26 enumerable: false, 26 enumerable: false,
27 value: 'rgb' 27 value: 'rgb'
28 }, 28 },
29 //////////////////////////////////////////////////////////////////// 29 ////////////////////////////////////////////////////////////////////
30 //Storing ColorPanel sliders mode 30 //Storing ColorPanel sliders mode
31 panelMode: { 31 panelMode: {
32 enumerable: true, 32 enumerable: true,
33 get: function() { 33 get: function () {
34 return this._panelMode; 34 return this._panelMode;
35 }, 35 },
36 set: function(value) { 36 set: function (value) {
37 if (value !== this._panelMode) { 37 if (value !== this._panelMode) {
38 this._panelMode = value; 38 this._panelMode = value;
39 } 39 }
40 } 40 }
41 }, 41 },
42 //////////////////////////////////////////////////////////////////// 42 ////////////////////////////////////////////////////////////////////
43 // 43 //
44 _colorBar: { 44 _colorBar: {
45 enumerable: false, 45 enumerable: false,
46 value: null 46 value: null
47 }, 47 },
48 //////////////////////////////////////////////////////////////////// 48 ////////////////////////////////////////////////////////////////////
49 //Storing color manager 49 //Storing color manager
@@ -54,19 +54,19 @@ exports.ColorPanelBase = Montage.create(Component, {
54 //////////////////////////////////////////////////////////////////// 54 ////////////////////////////////////////////////////////////////////
55 // 55 //
56 colorManager: { 56 colorManager: {
57 enumerable: true, 57 enumerable: true,
58 get: function() { 58 get: function () {
59 return this._colorManager; 59 return this._colorManager;
60 }, 60 },
61 set: function(value) { 61 set: function (value) {
62 if (value !== this._colorManager) { 62 if (value !== this._colorManager) {
63 this._colorManager = value; 63 this._colorManager = value;
64 //Updating input buttons 64 //Updating input buttons
65 this._colorManager.addEventListener('change', this._update.bind(this)); 65 this._colorManager.addEventListener('change', this._update.bind(this));
66 this._colorManager.addEventListener('changing', this._update.bind(this)); 66 this._colorManager.addEventListener('changing', this._update.bind(this));
67 //Updating history buttons once color is set 67 //Updating history buttons once color is set
68 this._colorManager.addEventListener('change', this._updateHistoryButtons.bind(this)); 68 this._colorManager.addEventListener('change', this._updateHistoryButtons.bind(this));
69 } 69 }
70 } 70 }
71 }, 71 },
72 //////////////////////////////////////////////////////////////////// 72 ////////////////////////////////////////////////////////////////////
@@ -78,1574 +78,1578 @@ exports.ColorPanelBase = Montage.create(Component, {
78 //////////////////////////////////////////////////////////////////// 78 ////////////////////////////////////////////////////////////////////
79 // 79 //
80 _combo: { 80 _combo: {
81 enumerable: false, 81 enumerable: false,
82 value: [{slider: null, hottext: null}, {slider: null, hottext: null}, {slider: null, hottext: null}, {slider: null, hottext: null}] 82 value: [{ slider: null, hottext: null }, { slider: null, hottext: null }, { slider: null, hottext: null }, { slider: null, hottext: null}]
83 }, 83 },
84 //////////////////////////////////////////////////////////////////// 84 ////////////////////////////////////////////////////////////////////
85 // 85 //
86 _buttons: { 86 _buttons: {
87 enumerable: false, 87 enumerable: false,
88 value: {chip: [], fill: [], stroke: [], current: [], previous: [], rgbmode: [], hslmode: [], hexinput: [], nocolor: [], reset: [], swap: [], mlabel1: [], mlabel2: [], mlabel3: []} 88 value: { chip: [], fill: [], stroke: [], current: [], previous: [], rgbmode: [], hslmode: [], hexinput: [], nocolor: [], reset: [], swap: [], mlabel1: [], mlabel2: [], mlabel3: [] }
89 }, 89 },
90 //////////////////////////////////////////////////////////////////// 90 ////////////////////////////////////////////////////////////////////
91 // 91 //
92 historyCache: { 92 historyCache: {
93 enumerable: false, 93 enumerable: false,
94 value: {current: null, previous: null} 94 value: { current: null, previous: null }
95 }, 95 },
96 //////////////////////////////////////////////////////////////////// 96 ////////////////////////////////////////////////////////////////////
97 // 97 //
98 colorChipProps: { 98 colorChipProps: {
99 enumerable: true, 99 enumerable: true,
100 value: {side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: true, panel: false} 100 value: { side: 'top', align: 'center', wheel: true, palette: true, gradient: true, image: true, panel: false }
101 }, 101 },
102 //////////////////////////////////////////////////////////////////// 102 ////////////////////////////////////////////////////////////////////
103 // 103 //
104 currentChip: { 104 currentChip: {
105 enumerable: true, 105 enumerable: true,
106 value: null 106 value: null
107 }, 107 },
108 //////////////////////////////////////////////////////////////////// 108 ////////////////////////////////////////////////////////////////////
109 // 109 //
110 previousInput: { 110 previousInput: {
111 enumerable: true, 111 enumerable: true,
112 value: null 112 value: null
113 }, 113 },
114 //////////////////////////////////////////////////////////////////// 114 ////////////////////////////////////////////////////////////////////
115 //Setting up elements/components 115 //Setting up elements/components
116 prepareForDraw: { 116 prepareForDraw: {
117 enumerable: false, 117 enumerable: false,
118 value: function() { 118 value: function () {
119 //TODO: Remove temporary hack, color history should be initilized 119 //TODO: Remove temporary hack, color history should be initilized
120 this.addEventListener('firstDraw', this, false); 120 this.addEventListener('firstDraw', this, false);
121 this.application.ninja.colorController.colorView = this; 121 this.application.ninja.colorController.colorView = this;
122 this.colorManager.colorHistory.fill = [{m: 'nocolor', c: {}, a: 1}]; 122 this.colorManager.colorHistory.fill = [{ m: 'nocolor', c: {}, a: 1}];
123 this.colorManager.colorHistory.stroke = [{m: 'nocolor', c: {}, a: 1}]; 123 this.colorManager.colorHistory.stroke = [{ m: 'nocolor', c: {}, a: 1}];
124 } 124 }
125 }, 125 },
126 126
127 handleFirstDraw: { 127 handleFirstDraw: {
128 enumerable: true, 128 enumerable: true,
129 value: function (e) { 129 value: function (e) {
130 // 130 //
131 this.application.ninja.colorController.createToolbar();
132 this.applyDefaultColors(); 131 this.applyDefaultColors();
133 this.removeEventListener('firstDraw', this, false); 132 this.removeEventListener('firstDraw', this, false);