diff options
author | Jose Antonio Marquez | 2012-03-22 09:57:32 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-22 09:57:32 -0700 |
commit | efcec76362a652033254fc6465dd127e8bebc04c (patch) | |
tree | 64e25dab08ac50c0fec62111b3112b13ba1f4f7f /js/panels/Components | |
parent | 24699c72a0efc1788bb26e0988a31fb0002f560c (diff) | |
download | ninja-efcec76362a652033254fc6465dd127e8bebc04c.tar.gz |
Adding firstDraw event to components added
This will allow us to re-parse the document for styles added dynamically.
Diffstat (limited to 'js/panels/Components')
-rwxr-xr-x | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index 599eeda3..3505393c 100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -297,6 +297,8 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
297 | styles[n] = defaultStyles[n]; | 297 | styles[n] = defaultStyles[n]; |
298 | } | 298 | } |
299 | } | 299 | } |
300 | |||
301 | instance.addEventListener('firstDraw', that, false); | ||
300 | 302 | ||
301 | that.application.ninja.currentDocument.setComponentInstance(instance, element); | 303 | that.application.ninja.currentDocument.setComponentInstance(instance, element); |
302 | 304 | ||
@@ -305,6 +307,12 @@ var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component | |||
305 | 307 | ||
306 | } | 308 | } |
307 | }, | 309 | }, |
310 | |||
311 | handleFirstDraw: { | ||
312 | value: function (e) { | ||
313 | NJevent("addComponentFirstDraw"); | ||
314 | } | ||
315 | }, | ||
308 | 316 | ||
309 | makeComponent: { | 317 | makeComponent: { |
310 | value: function(name) { | 318 | value: function(name) { |