diff options
author | Valerio Virgillito | 2012-05-07 13:23:07 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-07 13:23:07 -0700 |
commit | c9ae789c554a54a1e8702a3bf4e55c529568f4c1 (patch) | |
tree | 1b66647f209efa429b444591c3d56ebc0fd8cc9d /js/document/document-html.js | |
parent | 30e837ade2da7cb20caf7c5a69faf0888736bb9a (diff) | |
parent | b8c27edc106818ff84f93ebe30ce50359a03885b (diff) | |
download | ninja-c9ae789c554a54a1e8702a3bf4e55c529568f4c1.tar.gz |
Merge pull request #196 from joseeight/Document
Adding webGL for open file.
Diffstat (limited to 'js/document/document-html.js')
-rwxr-xr-x | js/document/document-html.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/js/document/document-html.js b/js/document/document-html.js index f3c135ed..79fe461b 100755 --- a/js/document/document-html.js +++ b/js/document/document-html.js | |||
@@ -63,7 +63,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
63 | //////////////////////////////////////////////////////////////////// | 63 | //////////////////////////////////////////////////////////////////// |
64 | // | 64 | // |
65 | init: { | 65 | init: { |
66 | value:function(file, context, callback, view) { | 66 | value:function(file, context, callback, view, template) { //TODO: Add template support logic |
67 | //Storing callback data for loaded dispatch | 67 | //Storing callback data for loaded dispatch |
68 | this.loaded.callback = callback; | 68 | this.loaded.callback = callback; |
69 | this.loaded.context = context; | 69 | this.loaded.context = context; |
@@ -85,16 +85,19 @@ exports.HtmlDocument = Montage.create(Component, { | |||
85 | this.model.views.design.show(); | 85 | this.model.views.design.show(); |
86 | this.model.views.design.iframe.style.opacity = 0; | 86 | this.model.views.design.iframe.style.opacity = 0; |
87 | this.model.views.design.content = this.model.file.content; | 87 | this.model.views.design.content = this.model.file.content; |
88 | //TODO: Improve reference | ||
89 | this.model.views.design.model = this.model; | ||
90 | // | ||
88 | //TODO: Clean up | 91 | //TODO: Clean up |
89 | this.model.views.design.render(function () { | 92 | this.model.views.design.render(function () { |
90 | //TODO: Identify and remove usage of '_document' | 93 | //TODO: Identify and remove usage of '_document' |
91 | this._document = this.model.views.design.document; | 94 | this._document = this.model.views.design.document; |
92 | //TODO: Check for needed | 95 | //TODO: Remove usage, seems as not needed |
93 | this.documentRoot = this.model.views.design.document.body; | 96 | this.documentRoot = this.model.views.design.document.body; |
94 | //TODO: Why is this needed? | 97 | //TODO: Why is this needed? |
95 | this._liveNodeList = this.documentRoot.getElementsByTagName('*'); | 98 | this._liveNodeList = this.model.views.design.document.body.getElementsByTagName('*'); |
96 | //Initiliazing document model | 99 | //Initiliazing document model |
97 | document.application.njUtils.makeElementModel(this.documentRoot, "Body", "body"); | 100 | document.application.njUtils.makeElementModel(this.model.views.design.document.body, "Body", "body"); |
98 | //Adding observer to know when template is ready | 101 | //Adding observer to know when template is ready |
99 | this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); | 102 | this._observer = new WebKitMutationObserver(this.handleTemplateReady.bind(this)); |
100 | this._observer.observe(this.model.views.design.document.head, {childList: true}); | 103 | this._observer.observe(this.model.views.design.document.head, {childList: true}); |
@@ -115,11 +118,7 @@ exports.HtmlDocument = Montage.create(Component, { | |||
115 | this.loaded.callback.call(this.loaded.context, this); | 118 | this.loaded.callback.call(this.loaded.context, this); |
116 | //Setting opacity to be viewable after load | 119 | //Setting opacity to be viewable after load |
117 | this.model.views.design.iframe.style.opacity = 1; | 120 | this.model.views.design.iframe.style.opacity = 1; |
118 | 121 | //TODO: Remove, this is a temp hard-coded hack | |
119 | |||
120 | |||
121 | |||
122 | |||
123 | this.application.ninja.appModel.show3dGrid = true; | 122 | this.application.ninja.appModel.show3dGrid = true; |
124 | } | 123 | } |
125 | } | 124 | } |