Skip to content

Commit

Permalink
Correct logic for restricting bonding of new molecules while molecule…
Browse files Browse the repository at this point in the history
…s are moving back into bounds. #118
  • Loading branch information
Denz1994 committed Jan 23, 2020
1 parent a86675a commit 2bad690
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common/model/Kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ define( require => {
canBond( a, b ) {
return this.getMolecule( a ) !== this.getMolecule( b ) &&
this.isAllowedStructure( this.getPossibleMoleculeStructureFromBond( a, b ) ) &&
!a.isSeparatingProperty.value &&
!b.isSeparatingProperty.value;
this.collectionLayout.availablePlayAreaBounds.containsPoint( a.positionProperty.value ) &&
this.collectionLayout.availablePlayAreaBounds.containsPoint( b.positionProperty.value );
}

/**
Expand Down

0 comments on commit 2bad690

Please sign in to comment.