Page 1 of 1

Zoom Actions not keeping mouse focus over same point in document

Posted: Tue Jan 17, 2023 7:20 pm
by nnansen
Hello,
I am attempting to get our zoom actions(via tool and click or mousewheel scroll) to keep the focus on the document where the mouse cursor is. It appears to choose seemingly random locations for the focus currently. It will snap to the top or bottom or top left corner.

We are using ChangeZoomReleativeFocusedImage from image viewer class. I have attempted to recreate the behavior without that method, but still get similar behavior and lack of zooming toward the mouse cursor/focus point.

I have tried the following in an attempt to circumvent ChangeZoomReleativeFocusedImage, with roughly the same result.
e.Viewer.IsFocusPointFixed = false;
e.Viewer.SizeMode = ImageSizeMode.Zoom;
e.Viewer.SetFocusedIndexByLocation(e.Location,false);
e.Viewer.Zoom = newZoom;

I could not find anything related in the pdf viewer demo, all the important calls I am trying to work with are coming from external code including mouse click and wheel roll events, and ChangeZoomReleativeFocusedImage. Cannot find any reference to either in the project. Though the demo does behave how we expect our zoom to behave.

Re: Zoom Actions not keeping mouse focus over same point in document

Posted: Wed Jan 18, 2023 9:50 am
by Alex
Hello,

For understanding the problem we need to reproduce the problem on our side. Please send us (to support@vintasoft.com) a small project, which allows to reproduce the problem, and we will try to provide the best solution for the problem.

Best regards, Alexander