开发者

Abort image loading in ImageFlow?

开发者 https://www.devze.com 2023-03-22 22:26 出处:网络
Finn Rudolph\'s ImageFlow.js is a wicked clever library. This may be a general JavaScript question inasmuch as I have an oncontextmenu event that (amo开发者_JAVA百科ng other things) removes an instanc

Finn Rudolph's ImageFlow.js is a wicked clever library.

This may be a general JavaScript question inasmuch as I have an oncontextmenu event that (amo开发者_JAVA百科ng other things) removes an instance of ImageFlow and creates a new one with a different set of images on rightClick or commandClick.

My problem is that once the original instance starts loading images, it continues until it's done, even if the dom structure created for it is removed. This means my new instance can't start loading until the old one finishes. Does anybody know of a way to abort the image loading?


found this answer and it worked for me.

A solution this simple and broad is either:

  1. Something I should have known about all along, or
  2. An incipient bug that's now just waiting to bite me.
0

精彩评论

暂无评论...
验证码 换一张
取 消