Zoom to fit functionality #2262
Unanswered
sreenandu123
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi team, I was trying to draw 100 polygons from coordinates 0 to 1000(start and end coordinates can be anything) in the Canvas using the code defined below. Since my canvas width and height is 400 and 500, the points above 400 get drawn outside of the viewport. Is there a way I can have a zoomtofit feature so that the canvas automatically pan and zooms out or zoom in to fit all the contents inside the canvas in the viewport? I tried plotting transformation logic for individual polygon which I think is a heavy task when drawing a lot of polygons. I would like to keep my coordinates as the same. Any help is appreciated..
Beta Was this translation helpful? Give feedback.
All reactions