Skip to content
Snippets Groups Projects
Commit b77f1d4d authored by Alexander Rose's avatar Alexander Rose
Browse files

move initDataActions to PluginContext

parent 3770fd77
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,6 @@ import { StateTransformParameters } from './state/common';
export class PluginUIContext extends PluginContext {
readonly customParamEditors = new Map<string, StateTransformParameters.Class>();
private initDataActions() {
if (!this.spec.actions) return;
for (const a of this.spec.actions) {
this.state.data.actions.add(a.action);
}
}
private initCustomParamEditors() {
if (!this.spec.customParamEditors) return;
......@@ -35,7 +28,6 @@ export class PluginUIContext extends PluginContext {
constructor(public spec: PluginUISpec) {
super(spec);
this.initDataActions();
this.initCustomParamEditors();
}
}
\ No newline at end of file
......@@ -388,6 +388,13 @@ export class PluginContext {
}
}
private initDataActions() {
if (!this.spec.actions) return;
for (const a of this.spec.actions) {
this.state.data.actions.add(a.action);
}
}
async init() {
this.subs.push(this.events.log.subscribe(e => this.log.entries = this.log.entries.push(e)));
......@@ -400,6 +407,7 @@ export class PluginContext {
(this.builders.structure as StructureBuilder) = new StructureBuilder(this);
this.initAnimations();
this.initDataActions();
await this.initBehaviors();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment