Closed arouinfar closed 3 years ago
I actually though it was easier to instrument on the listeners themselves, since for the height one the listener was added to many Nodes. Having the flexibility to disable based on the Node and/or listener is really nice.
Please experiment with PhET-iO elements like these, and let me know what you think:
height: projectileMotion.introScreen.view.cannonNode.heightDragListener.enabledProperty
rotation: projectileMotion.introScreen.view.cannonNode.barrelTopDragListener.enabledProperty
I also fixed the cursor, so that it can come from the input listener instead of each Node that the single listener is added to. This further simplifies the file. Now, disabled input listeners will show the default cursor.
The behavior is looking really nice. One (hopefully) minor request -- when cannonNode.heightDragListener.enabledProperty
is false can the cueing arrows be hidden?
It has been done.
Looks good, thanks!
For #244
Related issues https://github.com/phetsims/scenery/issues/1041 https://github.com/phetsims/scenery/issues/1116 https://github.com/phetsims/bending-light/issues/397
The cannon can be adjusted in two ways:
Clients should be able to independently disable these interactions (whether by pickableProperty or its successor).