aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-22 09:57:32 -0700
committerJose Antonio Marquez2012-03-22 09:57:32 -0700
commitefcec76362a652033254fc6465dd127e8bebc04c (patch)
tree64e25dab08ac50c0fec62111b3112b13ba1f4f7f /js/document
parent24699c72a0efc1788bb26e0988a31fb0002f560c (diff)
downloadninja-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/document')
-rw-r--r--js/document/templates/montage-html/main.reel/main.js11
1 files changed, 0 insertions, 11 deletions
diff --git a/js/document/templates/montage-html/main.reel/main.js b/js/document/templates/montage-html/main.reel/main.js
index 2970f37a..019c675e 100644
--- a/js/document/templates/montage-html/main.reel/main.js
+++ b/js/document/templates/montage-html/main.reel/main.js
@@ -31,8 +31,6 @@ exports.Main = Montage.create(Component, {
31 componentInstance.needsDraw = true; 31 componentInstance.needsDraw = true;
32 componentInstance.ownerComponent = self; 32 componentInstance.ownerComponent = self;
33 33
34 componentInstance.addEventListener("firstDraw", self, false);
35
36 callback(componentInstance, element); 34 callback(componentInstance, element);
37 }) 35 })
38 .end(); 36 .end();
@@ -46,14 +44,5 @@ exports.Main = Montage.create(Component, {
46 document.body.dispatchEvent( newEvent ); 44 document.body.dispatchEvent( newEvent );
47 45
48 } 46 }
49 },
50
51 handleFirstDraw: {
52 value: function() {
53 var newEvent = document.createEvent( "CustomEvent" );
54 newEvent.initCustomEvent( "addComponentFirstDraw", false, true );
55
56 document.body.dispatchEvent( newEvent );
57 }
58 } 47 }
59}); \ No newline at end of file 48}); \ No newline at end of file