diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-11-19 16:52:02 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-11-19 16:52:02 (GMT) |
commit | ed8243125946e86bd270c94405a57b65e0ef2b83 (patch) | |
tree | 8cfe8bfff7e84b704b7c79ec79ec577ac41ec5e2 /apps | |
parent | a5b2c2081329958710a59107854349f5b6a14bcb (diff) | |
download | uscxml-ed8243125946e86bd270c94405a57b65e0ef2b83.zip uscxml-ed8243125946e86bd270c94405a57b65e0ef2b83.tar.gz uscxml-ed8243125946e86bd270c94405a57b65e0ef2b83.tar.bz2 |
Handle width / height correctly
Diffstat (limited to 'apps')
-rw-r--r-- | apps/samples/vrml/viewer-webgl.js | 9 | ||||
-rw-r--r-- | apps/samples/vrml/viewer.html | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/apps/samples/vrml/viewer-webgl.js b/apps/samples/vrml/viewer-webgl.js index aa98761..c828b1f 100644 --- a/apps/samples/vrml/viewer-webgl.js +++ b/apps/samples/vrml/viewer-webgl.js @@ -23,8 +23,8 @@ function VRMLViewer(element, params) { x: 0, y: 0, z: 0, - width: this.width, - height: this.height, + width: false, + height: false, autorotate: false, } this.pose = pose; @@ -55,6 +55,11 @@ function VRMLViewer(element, params) { } } + if (!self.pose.width) + self.pose.width = self.width; + if (!self.pose.height) + self.pose.height = self.height; + var hasWebGL = function() { try { if (!window.WebGLRenderingContext) { diff --git a/apps/samples/vrml/viewer.html b/apps/samples/vrml/viewer.html index 873da0e..28ffbf3 100644 --- a/apps/samples/vrml/viewer.html +++ b/apps/samples/vrml/viewer.html @@ -69,10 +69,10 @@ x : 0, y : 0, z : 0, - width : 400, - height : 400, autorotate : true }, + height: 600, + width: 800, enableMovies: false, enableDND: false, enableWebGL: true, @@ -82,7 +82,7 @@ treeNavigationStyle: true, listDirectory: "/hard_mp", imagePath: "/hard_mp/HARD_MP_VAL_000", - imageFormat: "png", + imageFormat: ".png", serverURL: "http://localhost:8081/vrml", }); //var viewer2 = new VRMLViewer("scene2"); |