aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorhwc4872012-03-07 16:48:48 -0800
committerhwc4872012-03-07 16:48:48 -0800
commit818582d389f504c915be0c9052fafa33e3e76c92 (patch)
treeff686f52903d91f27f983b19e18c9909af5957d9 /js/document
parent855e8727b147771ff7b05e71bed481e65fe4b6b0 (diff)
downloadninja-818582d389f504c915be0c9052fafa33e3e76c92.tar.gz
File IO
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/html-document.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 8592a445..44f90d41 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -8,7 +8,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
8// 8//
9var Montage = require("montage/core/core").Montage, 9var Montage = require("montage/core/core").Montage,
10 TextDocument = require("js/document/text-document").TextDocument, 10 TextDocument = require("js/document/text-document").TextDocument,
11 NJUtils = require("js/lib/NJUtils").NJUtils; 11 NJUtils = require("js/lib/NJUtils").NJUtils,
12 CanvasDataManager = require("js/lib/rdge/runtime/CanvasDataManager").CanvasDataManager,
13 GLWorld = require("js/lib/drawing/world").World;
12//////////////////////////////////////////////////////////////////////// 14////////////////////////////////////////////////////////////////////////
13// 15//
14exports.HTMLDocument = Montage.create(TextDocument, { 16exports.HTMLDocument = Montage.create(TextDocument, {
@@ -185,7 +187,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
185 var elt = this.documentRoot; 187 var elt = this.documentRoot;
186 if (elt) 188 if (elt)
187 { 189 {
188 var loadForRuntime = false; 190 var loadForRuntime = true;
189 if (loadForRuntime) 191 if (loadForRuntime)
190 { 192 {
191 //console.log( "load canvas data: " , value ); 193 //console.log( "load canvas data: " , value );
@@ -224,7 +226,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
224 var useWebGL = (index >= 0) 226 var useWebGL = (index >= 0)
225 var world = new GLWorld( canvas, useWebGL ); 227 var world = new GLWorld( canvas, useWebGL );
226 world.import( importStr ); 228 world.import( importStr );
227 canvas.elementModel.shapeModel.GLWorld = world;
228 229
229 this.buildShapeModel( canvas.elementModel, world ); 230 this.buildShapeModel( canvas.elementModel, world );
230 } 231 }
@@ -789,8 +790,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
789 } 790 }
790 } 791 }
791 } 792 }
792 //return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; 793 return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
793 return {mode: 'html', document: this._userDocument, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
794 } else if (this.currentView === "code"){ 794 } else if (this.currentView === "code"){
795 //TODO: Would this get call when we are in code of HTML? 795 //TODO: Would this get call when we are in code of HTML?
796 } else { 796 } else {
@@ -813,8 +813,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
813 } 813 }
814 } 814 }
815 } 815 }
816 //return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; 816 return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
817 return {mode: 'html', document: this._userDocument, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML};
818 } else if (this.currentView === "code"){ 817 } else if (this.currentView === "code"){
819 //TODO: Would this get call when we are in code of HTML? 818 //TODO: Would this get call when we are in code of HTML?
820 } else { 819 } else {