Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function requestModelAction() : RequestModelAction {
return new RequestModelAction({ 'target' : getTarget()});
}
}
websocket.addEventListener('open', event => {
actionDispatcher.dispatch(new RequestModelAction({
sourceUri: `file://${examplePath}`,
diagramType: "workflow-diagram",
}));
actionDispatcher.dispatch(new RequestOperationsAction());
actionDispatcher.dispatch(new RequestTypeHintsAction("workflow-diagram"));
});
protected initializeSprotty() {
const modelSource = this.diContainer.get(TYPES.ModelSource);
if (modelSource instanceof DiagramServer)
modelSource.clientId = this.id;
if (modelSource instanceof GLSPTheiaDiagramServer && this.connector)
this.connector.connect(modelSource);
this.disposed.connect(() => {
if (modelSource instanceof GLSPTheiaDiagramServer && this.connector)
this.connector.disconnect(modelSource);
});
this.actionDispatcher.dispatch(new RequestModelAction({
sourceUri: this.options.uri,
diagramType: this.options.diagramType,
needsClientLayout: 'true'
}));
this.actionDispatcher.dispatch(new RequestOperationsAction());
this.actionDispatcher.dispatch(new RequestTypeHintsAction());
}
}