Skip to content

Commit

Permalink
interrupt other input listeners when starting different one, phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 22, 2023
1 parent a5a58d9 commit 9cf9e93
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions js/view/DraggableVectorNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ export default class DraggableVectorNode extends VectorNode {
transform: transformProperty,
positionProperty: vectorPositionProperty,
canStartPress: () => !body.userControlledVelocityProperty.value,
start: start,
start: () => {
keyboardDragListener.interrupt();
start();
},
end: end
} );
grabArea.addInputListener( dragListener );
Expand All @@ -165,7 +168,10 @@ export default class DraggableVectorNode extends VectorNode {
transform: transformProperty,
dragVelocity: 450,
shiftDragVelocity: 100,
start: start,
start: () => {
dragListener.interrupt();
start();
},
end: end
} );
this.addInputListener( keyboardDragListener );
Expand Down

0 comments on commit 9cf9e93

Please sign in to comment.