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

MouseEvent arguments mix-up #226

Closed
conrad opened this issue Sep 10, 2019 · 2 comments · Fixed by #227
Closed

MouseEvent arguments mix-up #226

conrad opened this issue Sep 10, 2019 · 2 comments · Fixed by #227

Comments

@conrad
Copy link

conrad commented Sep 10, 2019

Hello, I've just upgraded to v0.2.2, and two of the fields seem to have been swapped unintentionally. Previously, the arguments were event, { ray, object(s) }.

Now, I'm seeing that the second argument is still an object with the field ray, but this field then points to a mouse event object. Meanwhile, the first argument sent turns out to be a ray. To explain a little more this what the second argument looks like now:

{
  objects: [{…}]
  ray: Class
    altKey: false
    bubbles: true
    button: 0
    buttons: 0
    cancelable: true
    clientX: 640
    clientY: 233
    ctrlKey: false
    ...
  }
}

That Ray looks a lot like a MouseEvent...

I'm guessing this was just an accident. I'll switch these out in my code, in the meantime, and leave myself a note.

@conrad
Copy link
Author

conrad commented Sep 10, 2019

Or I'll dig around and make a PR if I find the issue.

@davidswinegar
Copy link
Collaborator

Thanks for the bug report! I'll take a look at this today.

davidswinegar added a commit that referenced this issue Sep 11, 2019
Fix bug of switching event and ray in object callbacks. Fixes #226.

Test plan: included integration test.
davidswinegar added a commit that referenced this issue Sep 11, 2019
Fix bug of switching event and ray in object callbacks. Fixes #226.

Test plan: included integration test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants