Skip to content

Commit

Permalink
Interrupt drag events when collections are swapped. #162
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Mar 4, 2020
1 parent 4910266 commit e058dff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/common/view/BAMScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ class BAMScreenView extends ScreenView {

// When a collection is changed, update the listeners to the kits and KitPlayAreaNode.
kitCollectionList.currentCollectionProperty.link( ( collection, previousCollection ) => {
console.log( 'TEST' );
this.kitPlayAreaNode.atomLayer.children.forEach( otherAtomNode => {
if ( otherAtomNode ) {
otherAtomNode.interruptSubtreeInput();
otherAtomNode.atom.userControlledProperty.reset();
}
} );
if ( previousCollection ) {
previousCollection.kits.forEach( kit => {

Expand Down

0 comments on commit e058dff

Please sign in to comment.