Search code examples
javascriptdom-eventsimageflow

Abort image loading in ImageFlow?


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 (among 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?


Solution

  • 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.