Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resizing diagram larger (zoom in) not consistent (Read 3532 times)
Rennie
Full Member
***
Offline


I Love MindFusion!

Posts: 108
Location: Copenhagen, Denmark
Joined: Jul 17th, 2012
Resizing diagram larger (zoom in) not consistent
Nov 2nd, 2013 at 4:52am
Print Post  
This is a bit difficult to explain, but here goes ...

When zooming in on the diagram using the opposite of the pinch gesture (un-pinch?) the "anchor point" for the zooming operation seems to be fairly random. By that I mean that sometimes the zoomed-in portion of the diagram seems to be the part of the diagram centered around the previous part of the diagram displayed. But sometimes it seems like the zoomed-in portion is such that the lower right corner remains the lower right corner, pushing the rest of the diagram off the left and top bounds. (As if the lower right corner was the "anchor point".)

I'm not very familiar with how these gestures are supposed to work. Maybe the un-pinch, depending on how it was done, is sometimes being interpreted as an un-pinch and a pan at the same time?

Anyway, for my app it is unfortunate when the un-pinch results in parts of the diagram being pushed off the left and top bounds. So I'd prefer that the un-pinch always perfroms the zoom in using the upper left corner as a kind of anchor point.

Does this make any sense to you? Any suggestions? Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resizing diagram larger (zoom in) not consistent
Reply #1 - Nov 5th, 2013 at 2:38pm
Print Post  
At this time the pinch anchor point is the center of the screen. What you describe seems to happen if the view is zoomed out a lot and the diagram.Bounds' bottom-right corner is near the center of the screen itself. The Bounds' bottom-right being near the anchor point makes the rest of the diagram move to the top-left when you zoom in. Is that what you are seeing? When the zoomed diagram is smaller than the view, I suppose we should either use the top-left corner as anchor point, or draw the diagram centered in the view instead of aligned at top-left corner.

Stoyan
  
Back to top
 
IP Logged
 
Rennie
Full Member
***
Offline


I Love MindFusion!

Posts: 108
Location: Copenhagen, Denmark
Joined: Jul 17th, 2012
Re: Resizing diagram larger (zoom in) not consistent
Reply #2 - Nov 6th, 2013 at 2:08pm
Print Post  
Yes, I think we're seeing the same thing. Although what I'm experiencing may be influenced by the viewportChanged() method I've created to prevent the problems described on the other thread that affects zooming out.

What I'd like (I think) is some way of specifying that when zooming in is being done that the upper left point visible in the diagram as currently displayed should be the "anchor point", so it remains in the upper left corner of the view.

Anyway, it's very unfortunate for my app that what gets pushed out of the view when the user zooms in is mostly the upper left part of the diagram, or at least that's the way it is experienced.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resizing diagram larger (zoom in) not consistent
Reply #3 - Nov 7th, 2013 at 9:21am
Print Post  
Try this version:
https://mindfusion.eu/_beta/DroidDiagram_zoom.zip

Zooming in is still centered by default, unless the zoomed diagram is smaller than the DiagramView. If the visible width and/or height are smaller than view’s width / height, zooming get anchored to left/top sides. You could also enable the new DiagramView.ZoomAtTopLeft property to always anchor zoom operations to currently visible top-left point.

In addition, zooming out now stops when the zoomed diagram becomes smaller than DiagramView.MinimumZoomSize property, 400 pixels by default.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint