Minor fix to killing the animation when the sim is killed

This commit is contained in:
Sam El-Husseini
2017-12-19 14:55:43 -08:00
parent 2157af3e63
commit ef5fa9ae82
5 changed files with 15 additions and 30 deletions

View File

@ -61,10 +61,6 @@ namespace pxsim.visuals {
}
}
public shouldUpdateState() {
return true;
}
public updateState() {
}
@ -179,23 +175,8 @@ namespace pxsim.visuals {
public setSelected(selected: boolean) { }
protected getView() {
if (!this.rendered) {
this.subscribe();
}
return super.getView();
}
protected onBoardStateChanged() {
// To be implemented by sub class
}
protected subscribe() {
board().updateSubscribers.push(() => {
if (this.state.didChange()) {
this.onBoardStateChanged();
}
});
}
}
export class ViewContainer extends View {