Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hover Programmatically ? #123

Open
felipeinfantino opened this issue Jul 20, 2021 · 1 comment
Open

Hover Programmatically ? #123

felipeinfantino opened this issue Jul 20, 2021 · 1 comment

Comments

@felipeinfantino
Copy link

Hello,

I'm using this library and so far is working great. Right now I need a way to show the cursor in a specific position programmatically, I have tried creating a MouseEvent and then dispatching it with dispatchEvent() but no luck.

Use case:
I have a bunch of pdfs (converted in pngs) in a carousel and whenever I change the page I want to zoom at a specific x and y coordinate. And for every pdf there is a different x and y coordinate. Is there maybe an easy to pass to the component also an object {x: number, y: number} so the magnify shows at this coordinate ?

If this is not possible, can someone guide me on how to implement it myself?

Thanks

@gooftroop
Copy link

Hi @felipeinfantino I've forked the project here: https://www.npmjs.com/package/@blacklab/react-image-magnify. If you recreate this issue in my repo I'll be happy to take a look at a solution.

As a note, I'm still working through some bugs that resulted in the rewrite. If you use this library and encounter any, please report them as issues in my github repo so I can address them.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants