diff options
author | Jonathan Duran | 2012-03-01 20:01:36 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-03-01 20:01:36 -0800 |
commit | b8fad971d8cf82cdc182160aa72d0c8e69800f76 (patch) | |
tree | e7791aacc4b4d59127600ad3e99bbb042b6506b0 /js/panels/Color | |
parent | 28befbc159399f70f00034f52e56a60dae0a3ba1 (diff) | |
parent | ff0a956f33df034e9a009cfcb8999e469456a4b5 (diff) | |
download | ninja-b8fad971d8cf82cdc182160aa72d0c8e69800f76.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into Timeline
Diffstat (limited to 'js/panels/Color')
-rwxr-xr-x | js/panels/Color/colorpanel.js | 11 | ||||
-rwxr-xr-x | js/panels/Color/colorpanelbase.reel/colorpanelbase.js | 13 |
2 files changed, 15 insertions, 9 deletions
diff --git a/js/panels/Color/colorpanel.js b/js/panels/Color/colorpanel.js index 4858be68..3a603e98 100755 --- a/js/panels/Color/colorpanel.js +++ b/js/panels/Color/colorpanel.js | |||
@@ -38,7 +38,7 @@ exports.ColorPanel = Montage.create(PanelBase, { | |||
38 | //////////////////////////////////////////////////////////// | 38 | //////////////////////////////////////////////////////////// |
39 | //////////////////////////////////////////////////////////// | 39 | //////////////////////////////////////////////////////////// |
40 | //TODO: Remove and add via toolbar draw loop | 40 | //TODO: Remove and add via toolbar draw loop |
41 | this.application.ninja.colorController.createToolbar(); | 41 | |
42 | //////////////////////////////////////////////////////////// | 42 | //////////////////////////////////////////////////////////// |
43 | //////////////////////////////////////////////////////////// | 43 | //////////////////////////////////////////////////////////// |
44 | 44 | ||
@@ -47,14 +47,7 @@ exports.ColorPanel = Montage.create(PanelBase, { | |||
47 | }, | 47 | }, |
48 | //////////////////////////////////////////////////////////////////// | 48 | //////////////////////////////////////////////////////////////////// |
49 | //Applying default colors only on first draw | 49 | //Applying default colors only on first draw |
50 | handleFirstDraw: { | 50 | |
51 | enumerable: true, | ||
52 | value: function (e) { | ||
53 | // | ||
54 | this.content.applyDefaultColors(); | ||
55 | this.content.removeEventListener('firstDraw', this, false); | ||
56 | } | ||
57 | } | ||
58 | //////////////////////////////////////////////////////////////////// | 51 | //////////////////////////////////////////////////////////////////// |
59 | //////////////////////////////////////////////////////////////////// | 52 | //////////////////////////////////////////////////////////////////// |
60 | }); \ No newline at end of file | 53 | }); \ No newline at end of file |
diff --git a/js/panels/Color/colorpanelbase.reel/colorpanelbase.js b/js/panels/Color/colorpanelbase.reel/colorpanelbase.js index ff738bbe..af62dd07 100755 --- a/js/panels/Color/colorpanelbase.reel/colorpanelbase.js +++ b/js/panels/Color/colorpanelbase.reel/colorpanelbase.js | |||
@@ -117,10 +117,23 @@ exports.ColorPanelBase = Montage.create(Component, { | |||
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); | ||
121 | this.application.ninja.colorController.colorView = this; | ||
120 | this.colorManager.colorHistory.fill = [{m: 'nocolor', c: {}, a: 1}]; | 122 | this.colorManager.colorHistory.fill = [{m: 'nocolor', c: {}, a: 1}]; |
121 | this.colorManager.colorHistory.stroke = [{m: 'nocolor', c: {}, a: 1}]; | 123 | this.colorManager.colorHistory.stroke = [{m: 'nocolor', c: {}, a: 1}]; |
122 | } | 124 | } |
123 | }, | 125 | }, |
126 | |||
127 | handleFirstDraw: { | ||
128 | enumerable: true, | ||
129 | value: function (e) { | ||
130 | // | ||
131 | this.application.ninja.colorController.createToolbar(); | ||
132 | this.applyDefaultColors(); | ||
133 | this.removeEventListener('firstDraw', this, false); | ||
134 | } | ||
135 | }, | ||
136 | |||
124 | //////////////////////////////////////////////////////////////////// | 137 | //////////////////////////////////////////////////////////////////// |
125 | //Assigning values and binding | 138 | //Assigning values and binding |
126 | willDraw: { | 139 | willDraw: { |