proj-imim:
Possible to offer the applet in different sizes
RDHoore (ProxyVista) 2000-Apr-27 19:39:00
> Question:
> Could it be possible to offer the applet in different sizes (not always
> 320x200) , as the pictureworks-applet does? ->
> http://www.pictureworks.com/vrtour/index.html
> Or is there a way, I didn't find?
Werner,
I open a separate window for the panorama (without any buttons, menu or
status bar), and let the user define the viewer window size simply by
resizing the browser window:
<SCRIPT LANGUAGE="JavaScript">
<!--
var IE4=(document.all);
var NS4=(document.layers);
function Resize() {
if (IE4) setTimeout('history.go(0);', 100);
if (NS4) setTimeout('window.location.reload();', 100);
}
-->
<body OnResize="Resize()">
<SCRIPT LANGUAGE="JavaScript">
<!--
if (parseFloat(navigator.appVersion) < 4) {
var w = 320;
var h = 200;
} else {
var w = (NS4) ? innerWidth : document.body.clientWidth;
var h = (NS4) ? innerHeight : document.body.clientHeight;
}
document.writeln('<APPLET name=myPano archive="ptviewer.jar"
code="ptviewer.class" width='+w+' height='+h+' ALIGN="MIDDLE">');
...
So, resizing only works with browser version 4 (NS or IE) onwards. For older
versions, the viewer window size will need to have a preset size. Best is to
open a non-resizable window in that case.
One serious disadvantage is that the image needs to be reloaded after every
resizing of the viewer window. But that you will have no matter how you
allow the user to define the viewer window size.
Ronny D'Hoore