Re-using pattern fills #592

wants to merge 1 commit into

4 participants


While using patterns (from external images) as a fill, i.e., fill:url(img.gif) the library was always appending new pattern elements to the dom rather than re-using existing ones. This causes a noticeable flicker on some cases while there is a new http request to get the image file.

Try on firefox and move the sliders to see the flickering version. If you inspect the dom you can see the new patterns being attend each time the slider moves.

Try with the fixed version to see that there is no flicker.

Great library btw!


👍 fixed the same problem for me. Thanks!


When the offset of the pattern fill matters, this fix introduces the problem that the position (translation) of the pattern is updated for every new elements using the same fill.


+1 for this pull request. here's the patch applied to version 2.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment