-
Notifications
You must be signed in to change notification settings - Fork 12
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
odd flags in Pointer subtypes #724
Comments
How about Mouse/Touch/Pen are cleaned up and we use |
jonathanolson
added a commit
to phetsims/area-model-common
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/charges-and-fields
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/circuit-construction-kit-common
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/sun
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/equality-explorer
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/expression-exchange
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/joist
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/make-a-ten
that referenced
this issue
Jan 17, 2018
jonathanolson
added a commit
to phetsims/molecule-shapes
that referenced
this issue
Jan 17, 2018
Removed and refactored all usages to the suggested type above. Closing. |
chrisklus
pushed a commit
to phetsims/counting-common
that referenced
this issue
Jun 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The subtypes of
Pointer
each have an odd flag that effectively identifies their type:isMouse
andisTouch
seem to be the preferred way of determining how an interactive object moves at the start of a drag cycle. For example, in equality-explorerItemDragHandler
:Since none of these flags are defined in
Pointer
, WebStorm (and other IDEs?) complain that these flags are unresolved variables. For the above example in WebStorm:Options:
• Live with the IDE complaint
• Define these flags in
Pointer
• Get rid of the flags and use constructor comparison, e.g.:
if ( event.pointer.constructor === Touch )
The text was updated successfully, but these errors were encountered: