Skip to content

Commit

Permalink
rename dragVelocity to dragSpeed, shiftDragVelocity to shiftDragSpeed,
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 29, 2024
1 parent 7fee452 commit d79b72c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions js/view/BodyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const DEFAULT_SPEED_VISIBLE_PROPERTY = new BooleanProperty( false );
type SelfOptions = {
draggable?: boolean;

// Velocities for keyboard drag controls
dragVelocity?: number;
shiftDragVelocity?: number;
// Speeds for keyboard drag controls
dragSpeed?: number;
shiftDragSpeed?: number;

// Function to constrain the potential drag position of the body
mapPosition?: ( position: Vector2, radius: number ) => Vector2;
Expand Down Expand Up @@ -88,8 +88,8 @@ export default class BodyNode extends InteractiveHighlighting( ShadedSphereNode

// SelfOptions
draggable: true,
dragVelocity: 450,
shiftDragVelocity: 100,
dragSpeed: 450,
shiftDragSpeed: 100,
mapPosition: _.identity,
speedVisibleProperty: DEFAULT_SPEED_VISIBLE_PROPERTY,
rectangleOptions: {
Expand Down Expand Up @@ -204,8 +204,8 @@ export default class BodyNode extends InteractiveHighlighting( ShadedSphereNode
mapPosition: map,
start: start,
end: end,
dragVelocity: options.dragVelocity,
shiftDragVelocity: options.shiftDragVelocity,
dragSpeed: options.dragSpeed,
shiftDragSpeed: options.shiftDragSpeed,
tandem: options.tandem.createTandem( 'keyboardDragListener' )
} );
this.addInputListener( keyboardDragListener );
Expand Down
14 changes: 7 additions & 7 deletions js/view/DraggableVelocityVectorNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ type SelfOptions = {
// For drag "bounds"-like handling
mapPosition?: ( position: Vector2, radius: number ) => Vector2;

// Velocities for keyboard drag controls
dragVelocity?: number;
shiftDragVelocity?: number;
// Speeds for keyboard drag controls
dragSpeed?: number;
shiftDragSpeed?: number;
};

export type DraggableVectorNodeOptions = SelfOptions &
Expand All @@ -62,8 +62,8 @@ export default class DraggableVelocityVectorNode extends VectorNode {
maxMagnitudeProperty: null,
soundViewNode: null,
mapPosition: _.identity,
dragVelocity: 450,
shiftDragVelocity: 100,
dragSpeed: 450,
shiftDragSpeed: 100,
fill: SolarSystemCommonColors.velocityColorProperty,

// VectorNodeOptions
Expand Down Expand Up @@ -175,8 +175,8 @@ export default class DraggableVelocityVectorNode extends VectorNode {
start();
},
end: end,
shiftDragVelocity: options.shiftDragVelocity,
dragVelocity: options.dragVelocity,
shiftDragSpeed: options.shiftDragSpeed,
dragSpeed: options.dragSpeed,
tandem: options.tandem.createTandem( 'keyboardDragListener' )
} );
this.addInputListener( keyboardDragListener );
Expand Down
4 changes: 2 additions & 2 deletions js/view/SolarSystemCommonMeasuringTapeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default class SolarSystemCommonMeasuringTapeNode extends MeasuringTapeNod
baseDragStarted: () => grabClip.play(),
baseDragEnded: () => releaseClip.play(),
keyboardDragListenerOptions: {
baseShiftDragVelocity: 100,
tipShiftDragVelocity: 100
baseShiftDragSpeed: 100,
tipShiftDragSpeed: 100
},
tandem: tandem,
phetioFeatured: true,
Expand Down

0 comments on commit d79b72c

Please sign in to comment.