ctrl-freaks / freezeframe.js

freezeframe.js is a library that pauses animated .gifs and enables them to animate on mouse hover / mouse click / touch event, or with trigger / release functions.
http://ctrl-freaks.github.io/freezeframe.js/
MIT License
1.41k stars 110 forks source link

freezeframe.js should have a method to refresh calculations of DOM element #106

Open eballeste opened 2 years ago

eballeste commented 2 years ago

depending on user's viewport width, an asset that might be originally hidden from viewport, the freezeframe script will give it a width and height of 0. it would be great to be able to call some type of refresh method that correctly calculates the images dimensions if it ever becomes visible due to browser resizing.

khalidabuhakmeh commented 1 year ago

I am having the same issue. Some of my GIFs are originally hidden, and thus they get an incorrect width and height.