summaryrefslogtreecommitdiffstats
path: root/apps/samples/vrml/viewer.js
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-18 16:16:23 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-18 16:16:23 (GMT)
commit98bb92660e542dc1b76b2a4de098c14856637429 (patch)
tree8d32aeb385026ba178e935416dc9eb0ae01ed97d /apps/samples/vrml/viewer.js
parent228c809a34fc270527c39522c7a361004197a786 (diff)
downloaduscxml-98bb92660e542dc1b76b2a4de098c14856637429.zip
uscxml-98bb92660e542dc1b76b2a4de098c14856637429.tar.gz
uscxml-98bb92660e542dc1b76b2a4de098c14856637429.tar.bz2
Simplified JS API for vrml viewer
Diffstat (limited to 'apps/samples/vrml/viewer.js')
-rw-r--r--apps/samples/vrml/viewer.js12
1 files changed, 8 insertions, 4 deletions
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);