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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.8
    • Fix Version/s: 1.1.9
    • Component/s: None
    • Labels:
      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

          Activity

            People

            • Assignee:
              lu4242 Leonardo Uribe
              Reporter:
              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