diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/color-controller.js | 2 | ||||
-rwxr-xr-x | js/models/color-model.js | 14 | ||||
-rwxr-xr-x | js/panels/color/colorchippopup.reel/colorchippopup.js | 4 | ||||
-rwxr-xr-x | js/panels/color/colorpanelbase.reel/colorpanelbase.js | 18 | ||||
-rwxr-xr-x | js/panels/color/colorpanelpopup.reel/colorpanelpopup.js | 8 | ||||
-rwxr-xr-x | js/panels/color/colortoolbar.reel/colortoolbar.js | 4 | ||||
-rwxr-xr-x | js/panels/properties.reel/properties.js | 4 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 6 | ||||
-rwxr-xr-x | js/tools/EyedropperTool.js | 2 |
9 files changed, 33 insertions, 29 deletions
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js index d4737aad..3edaff86 100755 --- a/js/controllers/color-controller.js +++ b/js/controllers/color-controller.js | |||
@@ -198,7 +198,7 @@ exports.ColorController = Montage.create(Component, { | |||
198 | enumerable: true, | 198 | enumerable: true, |
199 | value: function (e) { | 199 | value: function (e) { |
200 | // | 200 | // |
201 | var actionEvent, color, input = e._event.input, panelMode, mode = e._event.mode; | 201 | var color, input = e._event.input, panelMode, mode = e._event.mode; |
202 | if (this.colorView) { | 202 | if (this.colorView) { |
203 | panelMode = this.colorView.panelMode; | 203 | panelMode = this.colorView.panelMode; |
204 | } | 204 | } |
diff --git a/js/models/color-model.js b/js/models/color-model.js index 764feeb5..a2eab2e1 100755 --- a/js/models/color-model.js +++ b/js/models/color-model.js | |||
@@ -231,10 +231,10 @@ exports.ColorModel = Montage.create(Component, { | |||
231 | // | 231 | // |
232 | applyNoColor: { | 232 | applyNoColor: { |
233 | enumerable: true, | 233 | enumerable: true, |
234 | value: function () { | 234 | value: function (code) { |
235 | // | 235 | // |
236 | var nocolor = {}; | 236 | var nocolor = {}; |
237 | nocolor.wasSetByCode = true; | 237 | nocolor.wasSetByCode = code; |
238 | nocolor.type = 'change'; | 238 | nocolor.type = 'change'; |
239 | this.updateColorSelected('nocolor', nocolor); | 239 | this.updateColorSelected('nocolor', nocolor); |
240 | } | 240 | } |
@@ -310,29 +310,29 @@ exports.ColorModel = Montage.create(Component, { | |||
310 | case 'hex': | 310 | case 'hex': |
311 | switch (color.length) { | 311 | switch (color.length) { |
312 | case 1: | 312 | case 1: |
313 | this.applyNoColor(); | 313 | this.applyNoColor(false); |
314 | return; | 314 | return; |
315 | break; | 315 | break; |
316 | case 2: | 316 | case 2: |
317 | this.applyNoColor(); | 317 | this.applyNoColor(false); |
318 | return; | 318 | return; |
319 | break; | 319 | break; |
320 | case 3: | 320 | case 3: |
321 | color = color[0]+color[0]+color[1]+color[1]+color[2]+color[2]; | 321 | color = color[0]+color[0]+color[1]+color[1]+color[2]+color[2]; |
322 | break; | 322 | break; |
323 | case 4: | 323 | case 4: |
324 | this.applyNoColor(); | 324 | this.applyNoColor(false); |
325 | return; | 325 | return; |
326 | break; | 326 | break; |
327 | case 5: | 327 | case 5: |
328 | this.applyNoColor(); | 328 | this.applyNoColor(false); |
329 | return; | 329 | return; |
330 | break; | 330 | break; |
331 | case 6: | 331 | case 6: |
332 | //Nothing | 332 | //Nothing |
333 | break; | 333 | break; |
334 | default: | 334 | default: |
335 | this.applyNoColor(); | 335 | this.applyNoColor(false); |
336 | return; | 336 | return; |
337 | break; | 337 | break; |
338 | } | 338 | } |
diff --git a/js/panels/color/colorchippopup.reel/colorchippopup.js b/js/panels/color/colorchippopup.reel/colorchippopup.js index 414be8b7..923beca9 100755 --- a/js/panels/color/colorchippopup.reel/colorchippopup.js +++ b/js/panels/color/colorchippopup.reel/colorchippopup.js | |||
@@ -43,8 +43,8 @@ exports.ColorChipPopup = Montage.create(Component, { | |||
43 | // | 43 | // |
44 | setNoColor: { | 44 | setNoColor: { |
45 | enumerable: true, | 45 | enumerable: true, |
46 | value: function (e) { | 46 | value: function (code) { |
47 | this.colorManager.applyNoColor(); | 47 | this.colorManager.applyNoColor(code); |
48 | } | 48 | } |
49 | }, | 49 | }, |
50 | //////////////////////////////////////////////////////////////////// | 50 | //////////////////////////////////////////////////////////////////// |
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js index 7a28c55d..7071f590 100755 --- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js +++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js | |||
@@ -694,7 +694,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
694 | case 'nocolor': | 694 | case 'nocolor': |
695 | this._buttons.nocolor.push(button); | 695 | this._buttons.nocolor.push(button); |
696 | button.title = 'No Color'; | 696 | button.title = 'No Color'; |
697 | button.addEventListener('click', this.setNoColor.bind(this)); | 697 | button.addEventListener('click', function () {this.setNoColor(false)}.bind(this)); |
698 | break; | 698 | break; |
699 | //////////////////////////////////////////////////////// | 699 | //////////////////////////////////////////////////////// |
700 | case 'swap': | 700 | case 'swap': |
@@ -746,7 +746,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
746 | color.wasSetByCode = false; | 746 | color.wasSetByCode = false; |
747 | // | 747 | // |
748 | if (prev.m === 'nocolor') { | 748 | if (prev.m === 'nocolor') { |
749 | this.setNoColor(); | 749 | this.setNoColor(false); |
750 | } else { | 750 | } else { |
751 | this.colorManager.alpha = { value: alpha, wasSetByCode: true, type: 'change' }; | 751 | this.colorManager.alpha = { value: alpha, wasSetByCode: true, type: 'change' }; |
752 | this.colorManager[prev.m] = color; | 752 | this.colorManager[prev.m] = color; |
@@ -832,11 +832,11 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
832 | //TODO: Add set by code property | 832 | //TODO: Add set by code property |
833 | setNoColor: { | 833 | setNoColor: { |
834 | enumerable: true, | 834 | enumerable: true, |
835 | value: function (e) { | 835 | value: function (wasSetByCode) { |
836 | // | 836 | // |
837 | this.application.ninja.colorController.colorPopupManager.hideColorPopup(); | 837 | this.application.ninja.colorController.colorPopupManager.hideColorPopup(); |
838 | // | 838 | // |
839 | this.colorManager.applyNoColor(); | 839 | this.colorManager.applyNoColor(wasSetByCode); |
840 | } | 840 | } |
841 | }, | 841 | }, |
842 | //////////////////////////////////////////////////////////////////// | 842 | //////////////////////////////////////////////////////////////////// |
@@ -879,7 +879,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
879 | break; | 879 | break; |
880 | //////////////////////////////////////////////////////// | 880 | //////////////////////////////////////////////////////// |
881 | default: | 881 | default: |
882 | this.setNoColor(); | 882 | this.setNoColor(false); |
883 | break; | 883 | break; |
884 | //////////////////////////////////////////////////////// | 884 | //////////////////////////////////////////////////////// |
885 | } | 885 | } |
@@ -911,7 +911,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
911 | break; | 911 | break; |
912 | //////////////////////////////////////////////////////// | 912 | //////////////////////////////////////////////////////// |
913 | default: | 913 | default: |
914 | this.setNoColor(); | 914 | this.setNoColor(false); |
915 | break; | 915 | break; |
916 | //////////////////////////////////////////////////////// | 916 | //////////////////////////////////////////////////////// |
917 | } | 917 | } |
@@ -1300,7 +1300,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
1300 | update.type = 'change'; | 1300 | update.type = 'change'; |
1301 | this.colorManager.hsl = update; | 1301 | this.colorManager.hsl = update; |
1302 | } else { | 1302 | } else { |
1303 | this.colorManager.applyNoColor(); | 1303 | this.colorManager.applyNoColor(false); |
1304 | } | 1304 | } |
1305 | } else { | 1305 | } else { |
1306 | update = this.colorManager.hexToRgb(color); | 1306 | update = this.colorManager.hexToRgb(color); |
@@ -1309,7 +1309,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
1309 | update.type = 'change'; | 1309 | update.type = 'change'; |
1310 | this.colorManager.rgb = update; | 1310 | this.colorManager.rgb = update; |
1311 | } else { | 1311 | } else { |
1312 | this.colorManager.applyNoColor(); | 1312 | this.colorManager.applyNoColor(false); |
1313 | } | 1313 | } |
1314 | } | 1314 | } |
1315 | } | 1315 | } |
@@ -1553,7 +1553,7 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
1553 | this.colorManager.hsv = color.c; | 1553 | this.colorManager.hsv = color.c; |
1554 | break; | 1554 | break; |
1555 | default: | 1555 | default: |
1556 | this.colorManager.applyNoColor(); | 1556 | this.colorManager.applyNoColor(true); |
1557 | break; | 1557 | break; |
1558 | } | 1558 | } |
1559 | // | 1559 | // |
diff --git a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js index 4161cb50..ded06797 100755 --- a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js +++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js | |||
@@ -50,8 +50,8 @@ exports.ColorPanelPopup = Montage.create(Component, { | |||
50 | //////////////////////////////////////////////////////////////////// | 50 | //////////////////////////////////////////////////////////////////// |
51 | // | 51 | // |
52 | setNoColor: { | 52 | setNoColor: { |
53 | value: function (e) { | 53 | value: function (code) { |
54 | if (this.colorManager) this.colorManager.applyNoColor(); | 54 | if (this.colorManager) this.colorManager.applyNoColor(code); |
55 | } | 55 | } |
56 | }, |