diff options
Diffstat (limited to 'apps/samples')
-rw-r--r-- | apps/samples/vrml/viewer.html | 4 | ||||
-rw-r--r-- | apps/samples/vrml/viewer.js | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/apps/samples/vrml/viewer.html b/apps/samples/vrml/viewer.html index 52b0f66..1e1043b 100644 --- a/apps/samples/vrml/viewer.html +++ b/apps/samples/vrml/viewer.html @@ -46,9 +46,7 @@ <body class="tundra"> <table> <tr><td> - <div style="width: 600px; height: 600px"> - <div id="scene1"></div> - </div> + <div id="scene1" /> </td></tr> <tr><td> <div id="annotations1"></div> diff --git a/apps/samples/vrml/viewer.js b/apps/samples/vrml/viewer.js index c897917..f6f2e42 100644 --- a/apps/samples/vrml/viewer.js +++ b/apps/samples/vrml/viewer.js @@ -2,7 +2,7 @@ function VRMLViewer(element, params) { // private attributes var self = this; - + // private instanceId if (!VRMLViewer.instances) VRMLViewer.instances = 0; @@ -18,8 +18,8 @@ function VRMLViewer(element, params) { this.pose.x = 0; this.pose.y = 0; this.pose.z = 0; - this.pose.width = 640; - this.pose.height = 480; + this.pose.width = 450; + this.pose.height = 350; this.pose.autorotate = false; this.serverURL = "http://88.69.49.213:8080/vrml"; @@ -63,9 +63,12 @@ function VRMLViewer(element, params) { ready) { ready(function() { + if (typeof(element) === 'string') { element = dom.byId(element); } + element.style.height = self.pose.height; + element.style.width = self.pose.width; self.element = element; self.xhr = xhr; |