Skip to content

Commit

Permalink
Remove unlink, see: #160
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Apr 28, 2023
1 parent 757402d commit 86205ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common/model/CAVModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export default class CAVModel implements TModel {
this.objectCreated( soccerBall );
this.objectValueBecameNonNullEmitter.emit( soccerBall );
}
soccerBall.valueProperty.unlink( listener ); // Only create the card once, then no need to listen further
}
};
soccerBall.valueProperty.link( listener );
Expand Down Expand Up @@ -223,7 +222,7 @@ export default class CAVModel implements TModel {
...this.soccerBallGroup.map( soccerBall => soccerBall.valueProperty ),
...this.soccerBallGroup.map( soccerBall => soccerBall.animationModeProperty ) ], () => {

const kickedSoccerBalls = this.soccerBallGroup.filter(
const kickedSoccerBalls = this.getActiveSoccerBalls().filter(
soccerBall => soccerBall.valueProperty.value !== null ||
soccerBall.animationModeProperty.value === AnimationMode.FLYING ||
soccerBall.animationModeProperty.value === AnimationMode.STACKING
Expand Down Expand Up @@ -361,6 +360,7 @@ export default class CAVModel implements TModel {
this.isShowingMeanPredictionProperty.reset();
this.isShowingMedianPredictionProperty.reset();
this.distributionProperty.value = CAVModel.chooseDistribution();

this.clearData();

this.resetEmitter.emit();
Expand Down

0 comments on commit 86205ff

Please sign in to comment.