22 lines
595 B
JavaScript
22 lines
595 B
JavaScript
export class Modes {
|
|
constructor(engine, container) {
|
|
this._engine = engine;
|
|
this._container = container;
|
|
}
|
|
load(data) {
|
|
if (!data) {
|
|
return;
|
|
}
|
|
if (this._container) {
|
|
const interactors = this._engine.plugins.interactors.get(this._container);
|
|
if (interactors) {
|
|
for (const interactor of interactors) {
|
|
if (interactor.loadModeOptions) {
|
|
interactor.loadModeOptions(this, data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|