You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the flowviewer default zoom level to "1", with a current scale limit at 0.5.
Assuming that scale 0.5 means twice as zoomed out as 1, then if there are nodes out of this view, they cannot be seen. until a user zooms and pans accordingly. A quick solution here would be to measures the maximum x/y coordinates of the nodes, adds a padding factor (e.g. 1.05), and then reassert the zoom level to be:
zoom=fudge_factor*(init_window_size.x/max_node_x)
e.g. if window width is 300, and a node is found at 450, then with a fudge_factor of 1.05 the zoom level would 0.7.
The text was updated successfully, but these errors were encountered:
My experience is that there will always be content that won't fit (e.g. content that is thin and long either vertically or horizontally), hence I use the bounding box of the all content (that's why I created the containerGroup) and set the viewBox of the svg to that. That ensures a) the browser does the work and b) it works on mobile and desktop.
Disadvantage is that this happens in the browser and hence the user will notice it - zoom is reset.
EDIT:
additionally some flows have their content far away from (0,0) and then zoom becomes even weirder since you have work on where to center the zoom ...
Currently, the flowviewer default zoom level to "1", with a current scale limit at 0.5.
Assuming that scale
0.5
means twice as zoomed out as1
, then if there are nodes out of this view, they cannot be seen. until a user zooms and pans accordingly. A quick solution here would be to measures the maximum x/y coordinates of the nodes, adds a padding factor (e.g. 1.05), and then reassert the zoom level to be:e.g. if window width is
300
, and a node is found at450
, then with a fudge_factor of1.05
the zoom level would0.7
.The text was updated successfully, but these errors were encountered: