Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SetZoomLevel Doesn't Have an Effect on the Diagram (Read 1199 times)
alukes
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 61
Joined: Jul 1st, 2011
SetZoomLevel Doesn't Have an Effect on the Diagram
Mar 13th, 2019 at 11:21pm
Print Post  
Using 3.3 version

I have the following in document.onReady function
diagram.setZoomLevel(500); 

I change the value and it has no effect on the size of the nodes.
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: SetZoomLevel Doesn't Have an Effect on the Diagram
Reply #1 - Mar 14th, 2019 at 6:53am
Print Post  
Hi,

Did you try zoom factor like this,

    let zoomFactor: number = this.diagram.getZoomFactor();

    this.diagram.setZoomFactor(zoomFactor + 10);

Regards,
Kannan
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: SetZoomLevel Doesn't Have an Effect on the Diagram
Reply #2 - Mar 14th, 2019 at 11:00am
Print Post  
Hi,

Setting zoom level works as expected in my test. Can you verify that there are not errors or exceptions in the browser console happening, prior to calling setZoomLevel? Also, the zoom factor may get overwritten if you load a diagram from json/xml after you've set it in code. If you restore the diagram document from file, try moving the zoom assignment after it's been loaded.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint