Skip to content

Commit

Permalink
Remove usages of createObservableArray.getArray, see phetsims/axon#279
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 12, 2020
1 parent 67d3206 commit b3a41dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/common/model/Expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ inherit( Object, Expression, {
* @private
*/
getCoinTermsLeftToRight: function() {
return this.coinTerms.getArray().slice( 0 ).sort( function( ct1, ct2 ) {
return this.coinTerms.slice( 0 ).sort( function( ct1, ct2 ) {
return ct1.destinationProperty.get().x - ct2.destinationProperty.get().x;
} );
},
Expand Down
6 changes: 3 additions & 3 deletions js/common/model/ExpressionManipulationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ inherit( Object, ExpressionManipulationModel, {
} );

// get a list of user controlled expressions, max of one on mouse based systems, any number on touch devices
const userControlledExpressions = _.filter( this.expressions.getArray(), function( expression ) {
const userControlledExpressions = _.filter( this.expressions, function( expression ) {
return expression.userControlledProperty.get();
} );

Expand Down Expand Up @@ -245,7 +245,7 @@ inherit( Object, ExpressionManipulationModel, {
} );

// get a list of all user controlled coin terms, max of one coin on mouse-based systems, any number on touch devices
userControlledCoinTerms = _.filter( this.coinTerms.getArray(), function( coin ) {
userControlledCoinTerms = _.filter( this.coinTerms, function( coin ) {
return coin.userControlledProperty.get();
} );

Expand Down Expand Up @@ -351,7 +351,7 @@ inherit( Object, ExpressionManipulationModel, {
// coins is tested so that their halos can be activated.

// get a list of all user controlled coins, max of one coin on mouse-based systems, any number on touch devices
userControlledCoinTerms = _.filter( this.coinTerms.getArray(), function( coinTerm ) {
userControlledCoinTerms = _.filter( this.coinTerms, function( coinTerm ) {
return coinTerm.userControlledProperty.get();
} );

Expand Down
2 changes: 1 addition & 1 deletion js/common/view/ExpressionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function ExpressionNode( expression, simplifyNegativesProperty ) {

if ( expression.coinTerms.length > 0 ) {

const coinTermsLeftToRight = expression.coinTerms.getArray().slice().sort( function( ct1, ct2 ) {
const coinTermsLeftToRight = expression.coinTerms.slice().sort( function( ct1, ct2 ) {
return ct1.destinationProperty.get().x - ct2.destinationProperty.get().x;
} );

Expand Down

0 comments on commit b3a41dc

Please sign in to comment.