Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/728 #730

Merged
merged 1 commit into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Extends departing spawnPatterns outside the airspace at KSDF to prevent point deduction [#699](https://github.com/openscope/openscope/issues/699)
- Adds `footer` section to `index.html` and combines former partials `controls` and `score` with the `#command` input [#704](https://github.com/openscope/openscope/issues/704)
- updates styles to use flexbox with properly organized children
- Clear radar target collection when changing airports [#728](https://github.com/openscope/openscope/issues/728)



Expand Down
4 changes: 4 additions & 0 deletions src/assets/scripts/client/AppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export default class AppController {
* @chainable
*/
disable() {
this.eventBus.off(EVENT.AIRPORT_CHANGE, this.onAirportChange);

return this;
}

Expand Down Expand Up @@ -252,8 +254,10 @@ export default class AppController {
this.navigationLibrary.reset();
this.airlineController.reset();
this.aircraftController.aircraft_remove_all();
this.scopeModel.radarTargetCollection.reset();
this.spawnPatternCollection.reset();
GameController.destroyTimers();

this.spawnScheduler = null;

this.navigationLibrary.init(nextAirportJson);
Expand Down
1 change: 0 additions & 1 deletion src/assets/scripts/client/scope/RadarTargetCollection.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import _filter from 'lodash/filter';
import _forEach from 'lodash/forEach';
import _has from 'lodash/has';
import RadarTargetModel from './RadarTargetModel';
import BaseCollection from '../base/BaseCollection';
Expand Down