This is a migrated thread and some comments may be shown as answers.

Zoom to Shape

1 Answer 80 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 23 May 2013, 07:55 PM
Hi,
Is it possible to center and zoom in the diagram to a particular shape?

I've been trying to use a shape's Position as a parameter in the Diagram's ZoomIn() function, but it's not working as expected. When I first zoom to a shape, that shape is correctly centered in view. Subsequent zooms to other shapes don't work as well - the view is completely off. I guess ZoomIn() doesn't use the same coordinate system as Diagram Shapes, so the Position is something different at different zoom levels.

Maybe there's a "FocusOnShape()" function that I haven't yet found?

1 Answer, 1 is accepted

Sort by
0
Vivek
Top achievements
Rank 1
answered on 23 May 2013, 08:54 PM
Nevermind. The FitTo() function does exactly what I need.
Tags
Diagram
Asked by
Vivek
Top achievements
Rank 1
Answers by
Vivek
Top achievements
Rank 1
Share this question
or