This project has moved. For the latest updates, please go here.

Need help with Zoombox behaviour

Jun 17, 2013 at 11:21 AM
Edited Jun 21, 2013 at 7:41 AM
Hi! I've used Zoombox control in my graph library.
Actual preview example: https://graphx.codeplex.com/downloads/get/694788
Actual sources: https://graphx.codeplex.com/SourceControl/latest
Reproduce: In General Graph tab click on the dice button then drag any vertex to the left.

It works great and have many cool features but there is one special behaviour i want to get changed. Maybe you can point me how this can be achieved.

You can download library showcase example from the link above to see the behaviour. My content panel which holds vertices is wrapped by Zoombox control. The point is that when i'm dragging any vertex by mouse i'm changing the size of the content panel dynamically to fit all the vertices into the rectangle (minimize content area). If any vertex is being dragged to the top or left side of my content panel it speeds up greatly and zooming goes crazy making unable to operate vertices. If i drag vertex to the other sides all works good - content is resized but drag speed remains the same.

I suppose this is somehow related to scaling but right now i'm unable to find the reason for such behaviour. Any help will be appreciated. Thanks!
Jun 21, 2013 at 7:41 AM
Any clues? :(
Oct 2, 2014 at 3:20 AM
We're you able to solve this issue. I have a similar case where I have a canvas inside a zoombox. I change the canvas size. The zoombox doesn't behave correctly
Oct 2, 2014 at 11:05 AM
Yeah, the solution is to avoid any canvas size changes and make it transparent. I've come up with static canvas size and negative/positive child object coordinates. So when i drag my vertices canvas size isn't changed but it allows its children to be rendered outside of the canvas area.