Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Zooming when resizing (Read 1096 times)
Anna Malashkina
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 26
Joined: Sep 22nd, 2019
Zooming when resizing
Sep 24th, 2019 at 1:55pm
Print Post  
Hi all,

is it possible to zoom the diagram during resizing? I mean not to create overview window but perform zooming by getting the window smaller\greater (not to stretch the canvas picture but rescale the whole diagram).
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: Zooming when resizing
Reply #1 - Sep 25th, 2019 at 6:54am
Print Post  
Hi Anna,

I guess you want to change zoom so that same part of the diagram stays visible? Try recording the diagram's div size from window.onresize handler, and then scaling ZoomFactor by how much div's width changed. E.g. if the diagram div's became double the size (newWidth / oldWidth == 2), also double the zoom factor.

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