diff options
author | Jose Antonio Marquez | 2012-06-01 13:47:22 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-01 13:47:22 -0700 |
commit | 94190d38d659b05a0f071e88134651c2484629f6 (patch) | |
tree | e48d00b1841974a270af99de044b8b81896c5d12 /js | |
parent | 9c961c9ef3819f3a8e825f12ab8f5ed8507f9b18 (diff) | |
download | ninja-94190d38d659b05a0f071e88134651c2484629f6.tar.gz |
Fixing webGL helper
Diffstat (limited to 'js')
-rwxr-xr-x | js/document/document-html.js | 2 | ||||
-rwxr-xr-x | js/document/models/html.js | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index c60a12a2..b5684dc5 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -62,6 +62,8 @@ exports.HtmlDocument = Montage.create(Component, { | |||
62 | parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach | 62 | parentContainer: {value: document.getElementById("iframeContainer")}, //Saving reference to parent container of all views (should be changed to buckets approach |
63 | views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic | 63 | views: {value: {'design': DesignDocumentView.create(), 'code': null}} //TODO: Add code view logic |
64 | }); | 64 | }); |
65 | //Calling the any init routines in the model | ||
66 | this.model.init(); | ||
65 | //Initiliazing views and hiding | 67 | //Initiliazing views and hiding |
66 | if (this.model.views.design.initialize(this.model.parentContainer)) { | 68 | if (this.model.views.design.initialize(this.model.parentContainer)) { |
67 | //Hiding iFrame, just initiliazing | 69 | //Hiding iFrame, just initiliazing |
diff --git a/js/document/models/html.js b/js/document/models/html.js index fd42d4de..0fe33990 100755 --- a/js/document/models/html.js +++ b/js/document/models/html.js | |||
@@ -18,6 +18,14 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
18 | value: false | 18 | value: false |
19 | }, | 19 | }, |
20 | //////////////////////////////////////////////////////////////////// | 20 | //////////////////////////////////////////////////////////////////// |
21 | //Called by the document immidiately after the model is created | ||
22 | init: { | ||
23 | value:function() { | ||
24 | //Creating instance of the webGL helper for this model | ||
25 | this.webGlHelper = webGlDocumentHelper.create(); | ||
26 | } | ||
27 | }, | ||
28 | //////////////////////////////////////////////////////////////////// | ||
21 | // | 29 | // |
22 | selection: { | 30 | selection: { |
23 | value: [] | 31 | value: [] |
@@ -57,7 +65,7 @@ exports.HtmlDocumentModel = Montage.create(BaseDocumentModel, { | |||
57 | //////////////////////////////////////////////////////////////////// | 65 | //////////////////////////////////////////////////////////////////// |
58 | // | 66 | // |
59 | webGlHelper: { | 67 | webGlHelper: { |
60 | value: webGlDocumentHelper | 68 | value: null |
61 | }, | 69 | }, |
62 | //////////////////////////////////////////////////////////////////// | 70 | //////////////////////////////////////////////////////////////////// |
63 | // | 71 | // |