feat(image-zoom): improve zoom interactions and tap detection

- Added `will-change: transform` to CSS for better performance during zoom.
- Enhanced JavaScript to support tap detection for closing the zoom overlay with minimal movement.
- Updated zoom behavior to ensure scaling occurs from the center of the overlay.
- Refined event handling to prevent unintended interactions and improve user experience.
This commit is contained in:
Xin
2025-09-11 23:20:06 +01:00
parent 9e50415b94
commit be49fe6f57
2 changed files with 53 additions and 37 deletions

View File

@@ -16,6 +16,7 @@
/* Prevent iOS bounce */
position: fixed;
overflow: hidden;
will-change: transform;
}
.hextra-zoom-image-overlay.show {
@@ -68,7 +69,7 @@
}
}
.content img:not([data-no-zoom]) {
.content img:not([data-no-zoom]):not(.not-prose img) {
cursor: zoom-in;
}