SVG 查看器导致 IE8 在浏览器缩放时挂起
我们有一个网站,目前通过 SVG 查看器插件向用户提供绘图。我们有一位客户通过 IE8 看到它。使用 IE8,当他们在浏览器上将缩放级别更改为 100% 以外的任何值时,查看器会尝试占据新空间并正确缩放。但是,当用户尝试操纵绑定查看器的内部框架(这是一个框架集网站,查看器位于中心)时,整个网站都会挂起。 IE8 还显示它占用了客户端计算机上的 CPU 周期,因此它试图执行某些操作,但遇到了循环。
我不认为这实际上是我们的代码,可能只是 SVG 以及 IE8 如何处理插件及其缩放的方式。有谁知道这是否是一个真正的问题以及是否有好的解决方案?
We have a website that currently serves drawings to users via the SVG Viewer plugin. We have one client that sees it through IE8. With IE8, when they do a Change Zoom Level on the browser to anything other then 100%, the viewer tries to occupy the new space and zooms correctly. However, when the user tries to manipulate the frames inside that bound the viewer (it's a frameset website with the viewer being in the center) the entire site hangs. IE8 also shows that it takes up CPU cycles on the client computer, so it's trying to do something but hitting a loop.
I don't think this is actually our code and might just be something with SVG and how IE8 handles plugins and it's zoom. Does anyone know if this is a real problem and if there's a good solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您指的是 Adobe SVG Viewer 插件,那么我建议您(理想情况下)让您的客户开始使用原生支持 SVG 的 Web 浏览器 - 即 Chrome、Safari、Firefox、Opera;甚至 IE9(在某种程度上) - 或者使用不同的填充程序,例如 SVGWeb 来提供 SVG 支持使用旧版浏览器且安装了 Flash 的用户。
If you are referring to the Adobe SVG Viewer plug-in, then I recommend that you (ideally) get your clients to start using a web browser that supports SVG natively — i.e. Chrome, Safari, Firefox, Opera; even IE9 (to some extent) — or use a different shim like SVGWeb to provide SVG support for those users of older browsers who also have Flash installed.
我发现问题出在哪里了。我以为是 SVG 查看器试图对框架执行某些操作,结果发现我只是将框架集的初始大小设置为 clientHeight 和 clientWidth,然后从高度中减去一些内容。该减法是基于框架集的工具栏,当您更改浏览器中的缩放级别时,在尝试拉动组件大小和客户端大小时可能会发生锁定。至少,这是我所看到的。
I found out what the problem was. I thought it was the SVG viewer trying to do something with the frames, when it turned out that I was just setting the frameset's initial size to the clientHeight and clientWidth, and then subtracting something from the height. That subtraction was a toolbar based in the frameset and, when you change the zoom level in the browser, there's a lock up that can occur with you trying to pull a components size and the client's size. At least, this is what I was seeing.