拖动图像不包含在面板控件中
我在开发环境中的平移功能遇到了一些问题。我实现平移功能的方式是添加 JQuery 将图像拖动到面板控件后面。放大图像后即可使用平移功能。因此,我使用放大/缩小功能放大图像,然后平移或拖动面板控件后面的图像。这在我的本地环境中效果很好,甚至当我将网站部署到本地 IIS 时也是如此。但是,当我部署到开发服务器时,图像不会留在面板控件后面或不包含在其中。对于可能导致这种情况的原因有什么建议吗?以下是我尝试过的方法的一些信息。
我对两种环境进行了比较。
我本地环境的配置:
.NET Compact Framework 2.0 SP2(版本2.0.7045) .NET Compact Framework 3.5(版本 3.5.7283) .NET Framework 4 客户端配置文件(版本 4.0.30319) .NET Framework 4 扩展 .NET Framework 4 多目标包 AJAXControlToolkit:版本 3.5.50508.0
开发服务器上的配置:
.NET 2.0:.NET 2.0 SP2(版本 2.2.30729) .NET 3.0:.NET 3.0 SP2(版本 3.2.30729) .NET 3.5:.NET 3.5 SP1(版本 3.5.30729.1) AJAXControlToolkit:版本 1.0.20229.0
是否是版本中的轻微不匹配导致了该问题?我正在考虑以某种方式将本地计算机上的 .NET 版本与开发服务器的版本相匹配。这会引起问题吗?我还使用 Visual Studio 2008 Team System SP1 进行开发。
我尝试将 AJAXControlToolkit.dll 文件添加到开发服务器,但得到了相同的结果。
我尝试将面板控件设置为 style="overflow:hidden",但这似乎也不起作用。
这是我认为导致问题的代码片段:
<div id="draggable" style="position:relative;" onmousedown="makeDraggable(); return false;">
<img id="myimage" src="[path to image]" usemap="#circles" onmouseover="changeToHand()" />
</div>
</asp:Panel>
非常感谢任何帮助!
I'm having a little trouble with my panning functionality in my Dev environment. The way I implemented panning functionality adding JQuery to drag an image behind a panel control. The panning functionality is available after zooming into the image. So I zoom into the image with zoomin/zoomout functionality, then I pan or drag the image behind the panel control. This works great in my local environment and even when I deploy the website to my local IIS. However, when I deploy to the Dev server, the image does not stay behind the panel control or is not contained within it. Are there any suggestions on what might be causing this? Below is some information on approaches I've tried.
I did a comparison on the two environments.
Configuration on my local environment:
.NET Compact Framework 2.0 SP2 (Version 2.0.7045)
.NET Compact Framework 3.5 (Version 3.5.7283)
.NET Framework 4 Client Profile (Version 4.0.30319)
.NET Framework 4 Extended
.NET Framework 4 Multi-Targeting Pack
AJAXControlToolkit: Version 3.5.50508.0
Configuration on Dev Server:
.NET 2.0: .NET 2.0 SP2 (Version 2.2.30729)
.NET 3.0: .NET 3.0 SP2 (Version 3.2.30729)
.NET 3.5: .NET 3.5 SP1 (Version 3.5.30729.1)
AJAXControlToolkit: Version 1.0.20229.0
Could it be that the slight mismatch in versions is causing the problem? I was thinking of somehow matching the .NET versions on my local machine to that of the dev server. Would this cause an issue? Also I am using Visual Studio 2008 Team System SP1 for development.
I tried adding the AJAXControlToolkit.dll file to the Dev server, but I get the same results.
I tried setting the panel control to style="overflow:hidden", but that didn't seem to work either.
Here is the piece of code I think is causing the problem:
<div id="draggable" style="position:relative;" onmousedown="makeDraggable(); return false;">
<img id="myimage" src="[path to image]" usemap="#circles" onmouseover="changeToHand()" />
</div>
</asp:Panel>
Any help is greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该问题仅限于 IE。 Mozilla 和 Chrome 都很好。所以我去 IE 上进行配置,发现兼容性视图设置已打开。如果您位于 Intranet 上,请确保兼容性视图设置也已关闭。
The issue was isolated to IE. Mozilla and Chrome were fine. So I went to the configuration on IE and realized compatibility view settings were on. If you are on an intranet, make sure the compatibility view settings are off for that too.