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

Fix touch with mouse event bug on selection box usage #871

Merged

Conversation

vadimshvetsov
Copy link
Contributor

Checklist

  • The code has been run through pretty yarn run pretty
  • The tests pass on CircleCI
  • You have referenced the issue(s) or other PR(s) this fixes/relates-to
  • The PR Template has been filled out (see below)
  • Had a beer/coffee because you are awesome

What?

Getting Uncaught TypeError: Cannot read properties of undefined (reading 'x') when using SelectionBox

Closes #867

Why?

Because SelectionBox code uses interface as class with instanceof. It's always false.

How?

Remove instanceof usage and rely on object props.

Feel good image:

image

@vadimshvetsov vadimshvetsov changed the title Fix touch with mouse event bug Fix touch with mouse event bug on selection box usage Jul 22, 2021
@dylanvorster dylanvorster merged commit db25ec3 into projectstorm:master Jul 23, 2021
@vadimshvetsov vadimshvetsov deleted the fix-touch-mouse-event branch July 24, 2021 10:22
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 this pull request may close these issues.

Selection box cause an error
3 participants