We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set a default zoom level?

I am trying to change the default zoom level of a diagram so the user can fit more onto the diagram space available to them.

I want to zoom out "2 clicks worth" by default. That is, so the diagram looks the same as it does if I was to load up the diagram at it's default zoom, then hold control and roll the mouse wheel 2 clicks.

I know how to set the zoom factor, but this isn't what I want to change, I want to change the actual zoom level programatically.

This is quite an urgent requirement for a current product we are producing so if anybody can help that will be hugely appreciated.

4 Replies

SC Sudhakar C Syncfusion Team February 12, 2013 06:58 AM UTC

Hi Daniel,

 

We have provided the ZoomFactor option to change the zoom level of the Diagram View. This is the only option to customize the Zoom level. So, please set the ZoomFactor when you load the Diagram.

 

Please let us know if you require further assistance on this.

 

Regards,

 

Sudhakar C 



DH Daniel Harris February 12, 2013 09:27 PM UTC

I believe the zoom factor affects how much the diagram will zoom in or out when the user manually performs a zoom.

I want to automatically zoom out when the diagram is loaded.

It should be as if the diagram loaded, and then the user held down control, and rolled their mouse wheel 2 clicks to zoom out.



SC Sudhakar C Syncfusion Team February 13, 2013 05:09 AM UTC

Hi Daniel,

 

We have created a simple sample based on your requirement. In that sample, we have created some Nodes in the Table Layout and also we can Save & Load the diagram using the Buttons Named “Save & Load”. And we have executed the ZoomOut operation, when we load the diagram. Now, when we load the Diagram, it will be automatically zoomout. For more information please refer the attached sample and video. 

Please let us know if you require further assistance on this.

 

Regards,

 

Sudhakar C 



Zoom_8265b267.zip


SC Sudhakar C Syncfusion Team February 13, 2013 07:04 AM UTC

Hi Daniel,

 

Sorry for the inconvenience caused.

 

We have understood your requirement, we can zoom out the diagram automatically when load the diagram by executing the Zoom Out command in Diagram View’s loaded event. This loaded event will be fire, always when we load the Diagram. And also, we have modified the sample. In that sample, we have registered the Diagram View’s loaded event and executed  the Zoom Out command in that event. Now, when we run the sample, the diagram will be automatically zoomed out. For more information please refer the sample.Please let us know if you require further assistance on this.

 

Regards,

 

Sudhakar C



Zoom_84fdeb29.zip

Loader.
Live Chat Icon For mobile
Up arrow icon