Skip to content

Commit

Permalink
Replaced all position-based usages of 'location' with 'position'
Browse files Browse the repository at this point in the history
  • Loading branch information
SaurabhTotey authored and chrisklus committed Jun 2, 2021
1 parent a608a99 commit 889f2a2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions js/make-a-ten/common/model/ArithmeticRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ inherit( Object, ArithmeticRules, {}, {
* - If our number is 102, and our pulledPlace is 2 (mouse at the 1), it will pull 100 off.
*
* @param {number} numberValue - Numeric value that could potentially be pulled apart.
* @param {number} pulledPlace - Location in number where the user dragged. 0 is the 1s place, 1 is the 10s place, 2
* @param {number} pulledPlace - Position in number where the user dragged. 0 is the 1s place, 1 is the 10s place, 2
* is the 100s place, and 3 is the 1000s place.
* @returns {number} - How much to remove from numberValue (0 indicates can't be pulled off)
*/
Expand Down Expand Up @@ -90,4 +90,4 @@ inherit( Object, ArithmeticRules, {}, {
}
} );

export default ArithmeticRules;
export default ArithmeticRules;
6 changes: 3 additions & 3 deletions js/make-a-ten/common/model/MakeATenCommonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ inherit( Object, MakeATenCommonModel, {
* Given two paper numbers, combine them (set one's value to the sum of their previous values, and remove the
* other).
*
* @param {Bounds2} availableModelBounds - Constrain the location to be inside these bounds
* @param {Bounds2} availableModelBounds - Constrain the position to be inside these bounds
* @param {PaperNumber} draggedPaperNumber
* @param {PaperNumber} dropTargetNumber
*/
Expand Down Expand Up @@ -125,7 +125,7 @@ inherit( Object, MakeATenCommonModel, {
},

/**
* @param {Bounds2} availableModelBounds - Constrain the location to be inside these bounds
* @param {Bounds2} availableModelBounds - Constrain the position to be inside these bounds
* @param {PaperNumber} paperNumber1
* @param {PaperNumber} paperNumber2
*/
Expand Down Expand Up @@ -156,4 +156,4 @@ inherit( Object, MakeATenCommonModel, {
}
} );

export default MakeATenCommonModel;
export default MakeATenCommonModel;
6 changes: 3 additions & 3 deletions js/make-a-ten/common/model/PaperNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function PaperNumber( numberValue, initialPosition ) {
// @public {Vector2} - Destination is used for animation, and should be set through accessor methods only.
this.destination = initialPosition.copy(); // @private

// @public {boolean} - Whether this element is animating from one location to another, do not set externally.
// @public {boolean} - Whether this element is animating from one position to another, do not set externally.
this.animating = false;

// @public {Array.<BaseNumber>} - Represents the non-zero place values in this number. 1034 will have three place
Expand Down Expand Up @@ -237,7 +237,7 @@ inherit( Object, PaperNumber, {

const result = [];

// Divide by 10 each loop, using the remainder and place location to create the place numbers.
// Divide by 10 each loop, using the remainder and place index to create the place numbers.
let remainder = number;
let place = 0;
while ( remainder ) {
Expand Down Expand Up @@ -277,4 +277,4 @@ inherit( Object, PaperNumber, {
}
} );

export default PaperNumber;
export default PaperNumber;
6 changes: 3 additions & 3 deletions js/make-a-ten/common/view/BaseNumberNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const DIGIT_X_OFFSET = { 1: 93, 2: -7, 3: -7, 4: -9, 5: -18, 6: -5, 7: -24, 8: -
// digit => horizontal offset, customized for each single digit base number
const FIRST_PLACE_DIGIT_X_OFFSET = { 1: -61, 2: 0, 3: 0, 4: 0, 5: 5, 6: 0, 7: 15, 8: 10, 9: 15 };

// place => horizontal locations of the zeros in the base number
// place => horizontal positions of the zeros in the base number
const ZERO_OFFSET = {
0: [],
1: [ 335 ],
Expand All @@ -79,7 +79,7 @@ const SCALE = 72 / 300;
function BaseNumberNode( baseNumber, opacity ) {
Node.call( this, { scale: SCALE } );

// Location of the initial digit
// Position of the initial digit
let x = PLACE_X_OFFSET[ baseNumber.place ] + DIGIT_X_OFFSET[ baseNumber.digit ];
const y = PLACE_Y_OFFSET[ baseNumber.place ];

Expand Down Expand Up @@ -134,4 +134,4 @@ inherit( Node, BaseNumberNode, {}, {
]
} );

export default BaseNumberNode;
export default BaseNumberNode;

0 comments on commit 889f2a2

Please sign in to comment.