diff options
Diffstat (limited to 'js/panels')
7 files changed, 100 insertions, 88 deletions
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.html b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.html index 5ad5c615..596580b4 100755 --- a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.html +++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.html | |||
@@ -21,7 +21,18 @@ | |||
21 | "images": {"#": "cntnr_images"}, | 21 | "images": {"#": "cntnr_images"}, |
22 | "gradients": {"#": "cntnr_gradients"}, | 22 | "gradients": {"#": "cntnr_gradients"}, |
23 | "palettes": {"#": "cntnr_palettes"}, | 23 | "palettes": {"#": "cntnr_palettes"}, |
24 | "alpha": {"#": "cntnr_alpha"} | 24 | "alpha": {"#": "cntnr_alpha"}, |
25 | "alphaSlider": {"#": "alpha_slider"}, | ||
26 | "alphaHottext": {"#": "alpha_hottext"}, | ||
27 | "btnPrevious": {"#": "btn_previous"}, | ||
28 | "btnCurrent": {"#": "btn_current"}, | ||
29 | "btnWheel": {"#": "btn_wheel"}, | ||
30 | "btnImage": {"#": "btn_images"}, | ||
31 | "btnGradient": {"#": "btn_gradients"}, | ||
32 | "btnPalette": {"#": "btn_palettes"}, | ||
33 | "btnNocolor": {"#": "btn_nocolor"}, | ||
34 | "inputHex": {"#": "input_hex"} | ||
35 | |||
25 | } | 36 | } |
26 | } | 37 | } |
27 | } | 38 | } |
@@ -36,18 +47,18 @@ | |||
36 | 47 | ||
37 | <div class="cp_pu_history"> | 48 | <div class="cp_pu_history"> |
38 | 49 | ||
39 | <button class="cp_pu_color_previous">Previous Color</button> | 50 | <button data-montage-id="btn_previous" class="cp_pu_color_previous">Previous Color</button> |
40 | <button class="cp_pu_color_current">Current Color</button> | 51 | <button data-montage-id="btn_current" class="cp_pu_color_current">Current Color</button> |
41 | 52 | ||
42 | </div> | 53 | </div> |
43 | 54 | ||
44 | <div class="cp_pu_hex">#<input class="cp_pu_hottext_hex" maxlength="6" /></div> | 55 | <div data-montage-id="input_hex" class="cp_pu_hex">#<input class="cp_pu_hottext_hex" maxlength="6" /></div> |
45 | 56 | ||
46 | <button class="cp_pu_wheel" title="Color Wheel">Color Wheel</button> | 57 | <button data-montage-id="btn_wheel" class="cp_pu_wheel" title="Color Wheel">Color Wheel</button> |
47 | <button class="cp_pu_images" title="Background Image">Images</button> | 58 | <button data-montage-id="btn_images" class="cp_pu_images" title="Background Image">Images</button> |
48 | <button class="cp_pu_gradients" title="Gradient">Gradients</button> | 59 | <button data-montage-id="btn_gradients" class="cp_pu_gradients" title="Gradient">Gradients</button> |
49 | <button class="cp_pu_palettes" title="Color Palette">Palettes</button> | 60 | <button data-montage-id="btn_palettes" class="cp_pu_palettes" title="Color Palette">Palettes</button> |
50 | <button class="cp_pu_nocolor" title="No Color">No Color</button> | 61 | <button data-montage-id="btn_nocolor" class="cp_pu_nocolor" title="No Color">No Color</button> |
51 | 62 | ||
52 | </div> | 63 | </div> |
53 | 64 | ||
@@ -60,8 +71,8 @@ | |||
60 | 71 | ||
61 | <div data-montage-id="cntnr_alpha" class="cp_pu_alpha"> | 72 | <div data-montage-id="cntnr_alpha" class="cp_pu_alpha"> |
62 | <div class="cp_pu_a_label">Alpha</div> | 73 | <div class="cp_pu_a_label">Alpha</div> |
63 | <div class="cp_pu_a_slider"></div> | 74 | <div data-montage-id="alpha_slider" class="cp_pu_a_slider"></div> |
64 | <input class="cp_pu_a_hottext"/> | 75 | <input data-montage-id="alpha_hottext" class="cp_pu_a_hottext"/> |
65 | <div class="cp_pu_a_label2">%</div> | 76 | <div class="cp_pu_a_label2">%</div> |
66 | </div> | 77 | </div> |
67 | 78 | ||
diff --git a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js index aebbbd41..ded06797 100755 --- a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js +++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js | |||
@@ -23,19 +23,13 @@ exports.ColorPanelPopup = Montage.create(Component, { | |||
23 | //////////////////////////////////////////////////////////////////// | 23 | //////////////////////////////////////////////////////////////////// |
24 | //Storing color manager | 24 | //Storing color manager |
25 | _colorManager: { | 25 | _colorManager: { |
26 | value: false | 26 | value: null |
27 | }, | 27 | }, |
28 | //////////////// |