jesstelford / aframe-click-drag-component

Aframe Click & Drag Component
https://jesstelford.github.io/aframe-click-drag-component/
MIT License
103 stars 49 forks source link

Incorporate canvas position in mouse position calculation #22

Closed patrickocoffeyo closed 2 years ago

patrickocoffeyo commented 6 years ago

Hey there! Sweet component you've got here, thanks for sharing :)

I'm working on a WebVR editorial experience in which I'm using this package to allow editors to drag/drop components around, and noticed that the mouse position was wrong for embedded WebVR scenes, so I modified the mechanism that calculates the mouses X/Y coordinates such that it incorporates the canvas's position (closely in line with what's in the cursor component in AFrame.

jesstelford commented 2 years ago

Thank you for this improvement! (Better late than never 😅)

patrickocoffeyo commented 2 years ago

Nice! Thanks for the review 😀