mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
19 lines
408 B
TypeScript
19 lines
408 B
TypeScript
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 {}
|
|
}
|