I have a problem I cannot solve and am really desparate after 3 days of trying it.
I want to zoom a pane (via multitouch) and then reset the scroll position so that the center of the zoom is always the point zoomed in.
The easy part is actually zooming the pane. The hard part is adjusting the scrollbars. I do not use a scrollpane as it's pretty heavyweight, I use plain scrollbars instead, but any example that can do a position sensitive multitouch zoom in a scrollpane would be a great help anyway!
What I basically do is this:
I retrieve the (Semi)-correct bounds from my transform group, and then set scrollbar min and scrollbar max to the new values after the zoom. I am quite confident that those values are correct. However, when the center of the zoom is not the middle of the viewport or I have scrolled already a bit, then I will get nasty offsets and my custom scrolling won't work correctly then anymore.
I really need advice on how to adjust a scrollbar value to after I have zoomed the content.
It would be really kind if someone could provide an example for touch zoom in a scrollpane, as I do not know what to try anymore. FYI I did not manage to achieve this behaviour in a scrollpane either. Please help!
Edited by: 992759 on 08.03.2013 11:21