Skip to content

Commit

Permalink
fix insert individual steps
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed Aug 8, 2023
1 parent 54dec57 commit 8c241c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/Workflow/Editor/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export default {
// Load workflow definition
this.onWorkflowMessage("Importing workflow", "progress");
loadWorkflow({ id }).then((data) => {
fromSimple(id, data, true, defaultPosition(this.graphOffset, this.transform));
fromSimple(this.id, data, true, defaultPosition(this.graphOffset, this.transform));
// Determine if any parameters were 'upgraded' and provide message
const insertedStateMessages = getStateUpgradeMessages(data);
this.onInsertedStateMessages(insertedStateMessages);
Expand Down
8 changes: 8 additions & 0 deletions client/src/components/Workflow/Editor/modules/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ interface Workflow {
steps: Steps;
}

/**
* Loads a workflow into the editor
*
* @param id ID of workflow to load data *into*
* @param data Workflow data to load from
* @param appendData if true appends data to current workflow, making sure to create new uuids
* @param defaultPosition where to position workflow in the editor
*/
export async function fromSimple(
id: string,
data: Workflow,
Expand Down

0 comments on commit 8c241c9

Please sign in to comment.