Skip to content

Commit

Permalink
Update usages of KeyboardListener and KeyboardDragListener after chan…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 25, 2024
1 parent 0aa241a commit 4c4a284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/faradays-law/view/FaradaysLawKeyboardDragListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class FaradaysLawKeyboardDragListener extends KeyboardDragListener {
*/
constructor( model, regionManager, alertManager, options ) {

const drag = vectorDelta => {
const drag = ( event, listener ) => {
model.magnetArrowsVisibleProperty.set( false );

// Attempt to move the magnet based on the drag action. The model will prevent the magnet from going anywhere
// that it shouldn't.
const proposedPosition = model.magnet.positionProperty.get().plus( vectorDelta );
const proposedPosition = model.magnet.positionProperty.get().plus( listener.vectorDelta );
model.moveMagnetToPosition( proposedPosition );
};

Expand Down

0 comments on commit 4c4a284

Please sign in to comment.