Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1424

Patch for Sandbox ImageLoop - Flickering to old images after loading new image set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.8
    • 1.1.9
    • None
    • None

    Description

      When loading new image sets faster than the component needs to preload the images, old, inactive instances of the ImageLoop java script object keep displaying their images. This results in flickering between old an new images.
      Reason for this is, that preloading images (ImageLoop.prototype._preload) registers callback functions (ImageLoop.prototype._imagePreloaded), to start image loop (ImageLoop.prototype.start), as soon as all images are loaded. This happens regardless if the image loop instance is still the one, containing the images, the user want's to see or not (imageLoops[clientId]). Normally, as soon as a new ImageLoop instance is created, using the same clientId, the old instace with the same clientId is stopped (imageLoops[clientId].stop()). If the old instance is still preloading images, when stopped by the new created instance, the old istance is restarted, as soon as all images are loaded (ImageLoop.prototype._imagePreloaded -> this.start()). Because this is all done using callback handlers, the old images are shown, regardless if the ImageLoop instance is still properly attached.

      The attached patch solves this problem, by checking after preloading images and before starting image loop, if the instance is still the one, the user intends to see.

      Attachments

        1. imageloop.js.patch
          1 kB
          Matthias Gerber

        Activity

          People

            lu4242 Leonardo Uribe
            gerber@slf.ch Matthias Gerber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified