Limited Zooming - Content shifts sideways
Hi there

I need to limit the zooming when using the mouse wheel so I looked at the Limited Zooming Sample. It was easy enough to add the code to my project and it works but I noticed an issue when you zoom all the way in, then zoom out a little and back in. The second time you reach the limit of the zoom the code to center the image doesn't calculate the correct values and the image jumps diagonally.   It appears the values returned in OldViewboxValue on the second time you reach the zoom limit differ substantially from those set in NewViewboxValue when the center was re-calculated the first time and this causes the second calculation to shift the center of the viewbox.

It appears to only be a problem when using the mouse wheel.

I haven't been able to work out how to cater for this shift in values. Any help would be greatly appreciated



Messages In This Thread
Limited Zooming - Content shifts sideways - by PWVidendum - 09-12-2022, 10:00 PM

Forum Jump:

Users browsing this thread:
1 Guest(s)