Copy link to clipboard
Copied
I'm trying to get the object under my mouse, which at first, worked. I was using:
var atMouse = canvasTimeline.getObjectUnderPoint(e.stageX, e.stageY);
That worked until I embedded the canvas in HTML. It's in a Div that resizes it to 70% of the page's width. This seems to completely destroy the mouse coordinates system and any tutorial/approach I can find online.
I've tried systems using offsetX/offsetY, I've tried clientX,clientY, I think one of them was screenX,screenY, I've tried conversions that are supposed to convert page space to canvas space and... It fails at every turn.
What do I need to do, to get this working?
Copy link to clipboard
Copied
Can you share your files or hosted project somewhere to help us look into the issue. Also, are you using a Retina Mac/HiDPI display?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now