0

我正在使用 jcanvas 绘制图像,然后在该图像上显示各种形状(超过 100 个形状)。我遇到了一个问题 - 因为画布图像和画布形状似乎在不同时间加载。画布形状出现,然后在 0-5 秒后出现图像。此外,形状和图像会随机重新加载 - 它们会消失不到一秒钟,然后重新出现。

我还有一个与这些图像中的每一个相关的鼠标悬停事件 - 可能是我的形状太多,鼠标悬停事件太多?

4

1 回答 1

0

Figured it out. Turns out Firefox was sometimes loading the the image I was drawing from cache, and sometimes it was not... causing the image to sporadically re-load.

I displayed the image via html, and drew the image using jcanvas via the html elements' id - this has fixed the issue

于 2012-09-19T23:32:22.260 回答