react-image-magnify icon indicating copy to clipboard operation
react-image-magnify copied to clipboard

Hover Programmatically ?

Open felipeinfantino opened this issue 4 years ago • 1 comments

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

felipeinfantino avatar Jul 20 '21 08:07 felipeinfantino

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!

gooftroop avatar Sep 16 '21 19:09 gooftroop