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

movementX/Y to be double instead of long #24

Closed
NavidZ opened this issue Jul 20, 2017 · 5 comments · Fixed by #68
Closed

movementX/Y to be double instead of long #24

NavidZ opened this issue Jul 20, 2017 · 5 comments · Fixed by #68

Comments

@NavidZ
Copy link
Member

NavidZ commented Jul 20, 2017

Following the extension that changes screenX/Y type to double I'd suggest we also change the type of movementX/Y to double. @scheib do you imagine any scenario that this might break stuff for any developers?

@scheib
Copy link
Contributor

scheib commented Jul 20, 2017

I think movementX should be modified the same as screenX. I do not think this will break any existing use. I've opened w3c/csswg-drafts#1634 to help determine where to make this spec change.

@NavidZ
Copy link
Member Author

NavidZ commented May 23, 2018

@smaug---- I was looking at these properties and screenX/Y for pointerevents and mouseevents on FF. It seems that even screenX/Y is long for pointerevents. Do you think it is possible to change FF to expose double coordinates for pointerevents and also move the movementX/Y to double accordingly?

@smaug----
Copy link

should be doable. If nothing else, it is just a webidl change.

@NavidZ
Copy link
Member Author

NavidZ commented May 28, 2018

Maybe the type is correct by there might be some sort of rounding/flooring happen for that. For example in Chrome we do that for MouseEvents for compat reasons. So even though the type is double the numbers that are exposes are long. But we thought since pointerevents are new we just expose the double version of the number.

@mustaqahmed
Copy link
Member

As @smaug---- mentioned above, changing the webidl types to fractional is the first step anyway, and then we can do what we did before:

  • PointerEvent's movement coordinates will be fractional, and
  • MouseEvent's movement coordinates will be rounded to integers, and we drop the rounding here later on if the compat risk is low.

@EiraGe has agreed to look into this.

EiraGe added a commit to EiraGe/pointerlock that referenced this issue Nov 2, 2018
mustaqahmed pushed a commit that referenced this issue Jun 15, 2021
Update coordinate field to match [MouseEvent extension](https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface) in CCSOM View Module.

Close #24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants