diff options
-rw-r--r-- | apps/samples/vrml/viewer.html | 2 | ||||
-rw-r--r-- | apps/samples/vrml/viewer.js | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/apps/samples/vrml/viewer.html b/apps/samples/vrml/viewer.html index 4cf971b..ea1e7a4 100644 --- a/apps/samples/vrml/viewer.html +++ b/apps/samples/vrml/viewer.html @@ -36,7 +36,7 @@ <script type="text/javascript"> require(["dojo/domReady!", "dojo"], function(dom, dojo) { - var viewer = new VRMLViewer(dojo.byId("scene1"), { 'dojo': dojo }); + var viewer = new VRMLViewer("scene1"); }); </script> </head> diff --git a/apps/samples/vrml/viewer.js b/apps/samples/vrml/viewer.js index dac3a96..42edce1 100644 --- a/apps/samples/vrml/viewer.js +++ b/apps/samples/vrml/viewer.js @@ -1,11 +1,15 @@ function VRMLViewer(element, params) { - + // private attributes var self = this; var dojo = require("dojo"); var domConst = dojo.require('dojo/dom-construct'); var xhr = dojo.require("dojo/_base/xhr"); + if (typeof(element) === 'string') { + element = dojo.byId(element); + } + require(["dojox/storage"], function (storage) { self.localStorage = dojox.storage.manager.getProvider(); self.localStorage.initialize(); @@ -45,9 +49,9 @@ function VRMLViewer(element, params) { this.imageURL; view = "normal"; - if (params.view == "maximized") { - view = "maximized"; - } + // if (params.view == "maximized") { + // view = "maximized"; + // } // if (this.view == "maximized") { // this.width = Math.min(element.clientWidth - 150, 800); |