You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the zoom module's in() function allows a ratio parameter to be passed. It would be nice if we could also specify a position to zoom into. This would allow developers to implement custom functionality to be able to zoom in to a specific point of the image, rather than just the center.
Suggested solution
In the zoom module, add an optional position parameter to the in() function. This parameter could be a set of pixel coordinates on the image to zoom toward.
For example, we could call slider.in(2, [100,100]) to zoom an image by 2x and target the center to be on or around 100px from the left and 100px from the top of the image.
Agreed. Mine is not always zooming round the center of the image but I can not determine what it is using for the zoom center. It seems to vary but I haven't yet figure out what its' using to make the determination of center
Clear and concise description of the problem
Currently, the zoom module's
in()
function allows aratio
parameter to be passed. It would be nice if we could also specify a position to zoom into. This would allow developers to implement custom functionality to be able to zoom in to a specific point of the image, rather than just the center.Suggested solution
In the zoom module, add an optional
position
parameter to thein()
function. This parameter could be a set of pixel coordinates on the image to zoom toward.For example, we could call
slider.in(2, [100,100])
to zoom an image by 2x and target the center to be on or around 100px from the left and 100px from the top of the image.Alternative
No response
Additional context
No response
Validations
Would you like to open a PR for this feature?
The text was updated successfully, but these errors were encountered: