[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe resolved TOMAHAWK-1424.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.9-SNAPSHOT
         Assignee: Leonardo Uribe

Thanks to Matthias Gerber for provide this patch

> Patch for Sandbox ImageLoop - Flickering to old images after loading new 
> image set
> ----------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1424
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1424
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.8
>            Reporter: Matthias Gerber
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.9-SNAPSHOT
>
>         Attachments: imageloop.js.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to