PTViewer newPanoFromList()问题

发布于 2024-07-27 01:44:38 字数 1215 浏览 5 评论 0原文

我尝试在两个虚拟游览图像之间切换,每次切换时,它都会移动到我想要的位置。 但是当我在 newPanoFromList() 之后调用 moveTo() 时,它将执行 startAutoPan(),而不是移动到我想要的位置。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>PTViewer</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />

<SCRIPT language="javascript">
function moveToZero() {
document.ptviewer.newPanoFromList(0);
document.ptviewer.moveTo(143,0,53,200);
}
function moveToOne() {
document.ptviewer.newPanoFromList(1);
document.ptviewer.moveTo(-131,0,42,200);
}
</SCRIPT>


</head>
<body>

<APPLET name="ptviewer" archive=ptviewer.jar code=ptviewer.class width=640 height=480 mayscript=true>

<PARAM name=pano0   value="{file=virtual2.jpg}">
<PARAM name=pano1   value="{file=virtual3.jpg}">
<PARAM name=file   value="ptviewer:0">

</APPLET>

<input type="button" value="pano0" onclick="moveToZero()" />
<input type="button" value="pano1" onclick="moveToOne()" />


</body>
</html>

I tried to switch between 2 virtual tour images and each time when I switch, it will move to a position I want. But When I call moveTo() following newPanoFromList(), it will do the startAutoPan(), and not move to the position I want.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>PTViewer</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />

<SCRIPT language="javascript">
function moveToZero() {
document.ptviewer.newPanoFromList(0);
document.ptviewer.moveTo(143,0,53,200);
}
function moveToOne() {
document.ptviewer.newPanoFromList(1);
document.ptviewer.moveTo(-131,0,42,200);
}
</SCRIPT>


</head>
<body>

<APPLET name="ptviewer" archive=ptviewer.jar code=ptviewer.class width=640 height=480 mayscript=true>

<PARAM name=pano0   value="{file=virtual2.jpg}">
<PARAM name=pano1   value="{file=virtual3.jpg}">
<PARAM name=file   value="ptviewer:0">

</APPLET>

<input type="button" value="pano0" onclick="moveToZero()" />
<input type="button" value="pano1" onclick="moveToOne()" />


</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哥,最终变帅啦 2024-08-03 01:44:38

尝试添加 stopAutoPan():

<SCRIPT language="javascript">
function moveToZero() {
  document.ptviewer.newPanoFromList(0);
  document.ptviewer.moveTo(143,0,53,200);
}
function moveToOne() {
  document.ptviewer.newPanoFromList(1);
  document.ptviewer.stopAutoPan();
  document.ptviewer.moveTo(-131,0,42,200);
}
</SCRIPT>

Try adding stopAutoPan():

<SCRIPT language="javascript">
function moveToZero() {
  document.ptviewer.newPanoFromList(0);
  document.ptviewer.moveTo(143,0,53,200);
}
function moveToOne() {
  document.ptviewer.newPanoFromList(1);
  document.ptviewer.stopAutoPan();
  document.ptviewer.moveTo(-131,0,42,200);
}
</SCRIPT>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文