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

Mouse coords are relative to window not canvas #12

Open
vorg opened this issue Mar 19, 2018 · 1 comment
Open

Mouse coords are relative to window not canvas #12

vorg opened this issue Mar 19, 2018 · 1 comment
Assignees
Labels
type/fix A bug fix

Comments

@vorg
Copy link
Member

vorg commented Mar 19, 2018

I can't click correctly if e.g. body has padding

@vorg vorg added the bug label Mar 19, 2018
@dmnsgn
Copy link
Member

dmnsgn commented Mar 26, 2019

Do you have a repro case? Is it related to this commented part:

let mx = e.offsetX // ? e.offsetX : e.pageX - this._ctx.gl.canvas.offsetLeft
let my = e.offsetY // ? e.offsetY : e.pageY - this._ctx.gl.canvas.offsetTop

@dmnsgn dmnsgn added type/fix A bug fix and removed bug labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix A bug fix
Projects
None yet
Development

No branches or pull requests

2 participants