How to scale stage by its center #1687
Answered
by
BASEFlyer
giovanni-bertoncelli
asked this question in
Q&A
-
Hi, |
Beta Was this translation helpful? Give feedback.
Answered by
BASEFlyer
Dec 15, 2023
Replies: 2 comments 2 replies
-
I've already tried to use offset on the stage but with no luck, the scaling operation is always done by the corner |
Beta Was this translation helpful? Give feedback.
1 reply
-
https://konvajs.org/docs/sandbox/Zooming_Relative_To_Pointer.html Use this as an example, just replace mouse position for center of canvas. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
giovanni-bertoncelli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://konvajs.org/docs/sandbox/Zooming_Relative_To_Pointer.html
Use this as an example, just replace mouse position for center of canvas.