mirror of
https://github.com/zulip/zulip.git
synced 2026-07-03 21:10:12 +08:00
This PR changes how the Pan & Zoom feature of images displayed in the attachment lightbox are handled. The existing method of using a canvas element is replaced by the Panzoom library (timmywil/panzoom). This library is lightweight and has 0 transitive dependencies. This fixes #20759 where the issue is that the viewport of a zoomed image was not expanding to fill the available space on the page. Switching to this new library also solves several other UX issues: * Images are no longer blurred when in Pan & Zoom mode. * The zoom behavior itself uses focal point zooming: zooming occurs where the cursor is on the image instead of at the center of the image, reducing the need for extra panning. * CSS transitions are used for a more visually pleasing experience when switching images, toggling zoom off, etc. * The library has the potential to open other file types which leaves that option open for us in the future. |
||
|---|---|---|
| .. | ||
| assets | ||
| audio | ||
| generated | ||
| html | ||
| images | ||
| js | ||
| shared | ||
| styles | ||
| templates | ||
| third | ||
| .gitignore | ||