Zoom Actions not keeping mouse focus over same point in document

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
nnansen
Posts: 1
Joined: Fri Nov 04, 2022 11:36 pm

Zoom Actions not keeping mouse focus over same point in document

Post 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.
Alex
Site Admin
Posts: 2092
Joined: Thu Jul 10, 2008 2:21 pm

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

Post 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
Post Reply