diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-18 16:16:23 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-18 16:16:23 (GMT) |
commit | 98bb92660e542dc1b76b2a4de098c14856637429 (patch) | |
tree | 8d32aeb385026ba178e935416dc9eb0ae01ed97d /apps | |
parent | 228c809a34fc270527c39522c7a361004197a786 (diff) | |
download | uscxml-98bb92660e542dc1b76b2a4de098c14856637429.zip uscxml-98bb92660e542dc1b76b2a4de098c14856637429.tar.gz uscxml-98bb92660e542dc1b76b2a4de098c14856637429.tar.bz2 |
Simplified JS API for vrml viewer
Diffstat (limited to 'apps')
-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); |