Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Some Zoom issues

 Post Reply Post Reply
Author
Wilbourn David View Drop Down
New Member
New Member
Avatar

Joined: 18 Aug 2010
Posts: 34
Post Options Post Options   Quote Wilbourn David Quote  Post ReplyReply Direct Link To This Post Topic: Some Zoom issues
    Posted: 21 Aug 2019 at 12:19pm
This is really 3 questions/comments about zooming....
Simple comment: The atDiagram.zoom property is only updated *after* a MouseWheel event ends so getting the zoom value while in the event procedure returns the zoom value from before the event started. I got round this by starting a 10ms timer on MouseWheel and getting the new zoom value there.

Zooming about a point: The ZoomMoveToFit method is very handy, zooming and positioning the diagram in the center of the window. However zooming (in) after that expands the diagram about the top-left corner so the diagram rapidly disappears out the bottom right corner of the window. I have tried resetting the scrollbars to re-center the diagram but can't figure out what needs to go where and by how much. :-( If anyone has some code on how I can do this I would be most grateful! A method to zoom centered on the mouse position would be even better!

Diagram margins when zooming: When a diagram is zoomed in, the top and left 'margins' are maintained however the bottom and right edges of the window are set hard up against the edge of the diagram. This is ugly and not user friendly. I tried setting the atDiagram margin and increasing the ClientWidth/Height after a MouseWheel zoom event if the scrollbars are active but neither worked. 
Again, any solutions would be appreciated. 

David.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2389
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 21 Aug 2019 at 2:09pm
1. That's expected as the OnMouseWheel event has a Handled property that if returned True will cancel the default diagram behavior. Thus the zoom is only affected after the event is processed.

2. Sorry but I couldn't understand the steps to reproduce it. What do you mean by "zooming in" and "expands the diagram about the top-left corner"? I couldn't visualize it. Can you maybe provide a video to better illustrate it?

3. Which diagram margins are you referring to? A screenshot would also help here, thank you.
Back to Top
Wilbourn David View Drop Down
New Member
New Member
Avatar

Joined: 18 Aug 2010
Posts: 34
Post Options Post Options   Quote Wilbourn David Quote  Post ReplyReply Direct Link To This Post Posted: 21 Aug 2019 at 3:20pm
Sorry if that is unclear. I have made a short screen capture video which I hope illustrates it. 
In the video I am zooming in using the mousewheel. At the end you can see that there is no room below the diagram.

https://wetransfer.com/downloads/78fa3a5e2d511d7cedbed0c4d97bf6d120190821131649/4418613dc0df1fd805a0e251ffc4e88f20190821131649/4e4da8
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2389
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 22 Aug 2019 at 2:20pm
That's also by design and expected. The margins are only applied when you call ZoomToFit. The diagram doesn't save the margins, when you zoom in, it recalculates the scrollbars.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down