mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
Update mcschema to new mounter system
This commit is contained in:
18
src/app/AbstractView.ts
Normal file
18
src/app/AbstractView.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ModelListener, DataModel } from '@mcschema/core';
|
||||
|
||||
export abstract class AbstractView implements ModelListener {
|
||||
model: DataModel
|
||||
|
||||
constructor(model: DataModel) {
|
||||
this.model = model
|
||||
this.model.addListener(this)
|
||||
}
|
||||
|
||||
setModel(model: DataModel) {
|
||||
this.model.removeListener(this)
|
||||
this.model = model
|
||||
this.model.addListener(this)
|
||||
}
|
||||
|
||||
invalidated(model: DataModel): void {}
|
||||
}
|
||||
Reference in New Issue
Block a user