1 Reply Latest reply on Nov 5, 2016 10:07 AM by Nipun Asthana

    Mouse coordinates issue


      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?