diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-12-17 17:17:12 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-12-17 17:17:12 +0100 |
| commit | 03be4133908ca7e9af90a13bdaf9d3cde1430c9e (patch) | |
| tree | b622d547c0f6d0252ed46df815b850025470db02 /static/pages/image-viewer | |
| parent | 2f0b09dcb4595b3a5c4204e82b1cddd511a53743 (diff) | |
add download button
Diffstat (limited to 'static/pages/image-viewer')
| -rw-r--r-- | static/pages/image-viewer/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/static/pages/image-viewer/index.js b/static/pages/image-viewer/index.js index 62e39d8..d4c9dd9 100644 --- a/static/pages/image-viewer/index.js +++ b/static/pages/image-viewer/index.js @@ -68,7 +68,7 @@ export default class ImageViewer extends sfw.element.Container { #preload(image) { const loading_zone_after = (this.#container.scrollTop + this.#container.offsetHeight) * 2; - const loading_zone_before = this.#container.scrollTop - (this.#container.offsetHeight - image.offsetHeight) * 2; + const loading_zone_before = this.#container.scrollTop - image.offsetHeight * 2; if (loading_zone_before < image.offsetTop && image.offsetTop < loading_zone_after) { image.load(); |