-
What's the best approach (How to add) zoom feature to the smooth scrollbar library? At the same time my scrollbar container width changes depending on the state of the application and it affects the position of the scrollbar content and scroll if I have zoom. Thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Zooming is quite a difficult feature that comes with a lot of re-calculations. The following link is an (inefficient) approach I tried in a recent project, implementing a scalable image viewer in keyframe refiner. You can drag&drop an image into it and zoom it with trackpads (or holding ctrl and scrolling the mouse wheel) to see how it behaves. Source: keyframe-refiner/src/app/views/ImageViewer.svelte#L113-L146 |
Beta Was this translation helpful? Give feedback.
Zooming is quite a difficult feature that comes with a lot of re-calculations. The following link is an (inefficient) approach I tried in a recent project, implementing a scalable image viewer in keyframe refiner. You can drag&drop an image into it and zoom it with trackpads (or holding ctrl and scrolling the mouse wheel) to see how it behaves.
Source: keyframe-refiner/src/app/views/ImageViewer.svelte#L113-L146