Skip to content

Refactor create new drawing #27

@tim-kilian

Description

@tim-kilian

Problem

As I could figure out, how to create a new drawing I created a new instance for it and used a setTimeout hack. This is not the right way and should be refactored. Maybe loading a new drawing should be part of the lib.

newDrawing () {
this.$instances.modeler = new Modeler();
this.$instances.modeler.addFormalism(PluginBase);
this.$instances.modeler.addFormalism(PluginPT);
this.$instances.simulator = new Simulator();
this.$instances.simulator.addFormalism(PluginBase);
this.$instances.simulator.addFormalism(PluginPT);
this.$store.commit('setActiveContext');
setTimeout(() => {
this.$store.commit('setActiveContext', contexts.modeling);
}, 0);
},
open: function () {

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions