mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-07 00:13:53 +00:00
7ec1179ede
The cuesheet is a virtualised table: rows are unmounted once they leave the viewport, taking the <img> elements with them. On the way back the image has no dimensions until the browser makes it available, so the row grows under the user as it loads. We now remember the aspect ratio of the images we have seen and use it to reserve the space the image will take. This holds two numbers per image: the image data itself is left to the browser cache, which is better placed than us to decide when memory should be released. Also drops the lazy loading attribute: the row is only mounted when it is already close to the viewport, so it only adds a gate before the request. Whether the image is fetched again on scroll back is decided by the cache headers of the host serving it, and cannot be worked around from here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKXcDrZoQXbJpaXiLi1aff