Skip to content

Commit

Permalink
Made Vector2 constructor arguments required, see phetsims/dot#85
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 16, 2019
1 parent 1cd963b commit e1d9737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/make-a-ten/explore/view/ExplorePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ define( function( require ) {

// We want this relative to the screen view, so it is guaranteed to be the proper view coordinates.
var viewPosition = screenView.globalToLocalPoint( event.pointer.point );
var paperNumber = new PaperNumber( numberValue, new Vector2() );
var paperNumber = new PaperNumber( numberValue, new Vector2( 0, 0 ) );

// Once we have the number's bounds, we set the position so that our pointer is in the middle of the drag target.
paperNumber.setDestination( viewPosition.minus( paperNumber.getDragTargetOffset() ), false );
Expand Down
2 changes: 1 addition & 1 deletion js/make-a-ten/explore/view/MakeATenExploreScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ define( function( require ) {

// Set its destination to the proper target (with the offset so that it will disappear once centered).
var targetPosition = this.explorePanel.getOriginLocation( baseNumber.digitLength );
var paperCenterOffset = new PaperNumber( baseNumber.numberValue, new Vector2() ).getLocalBounds().center;
var paperCenterOffset = new PaperNumber( baseNumber.numberValue, new Vector2( 0, 0 ) ).getLocalBounds().center;
targetPosition = targetPosition.minus( paperCenterOffset );
basePaperNumber.setDestination( targetPosition, true );

Expand Down

0 comments on commit e1d9737

Please sign in to comment.