From c091ff72babfa730090b3453c1aacabdef662ff6 Mon Sep 17 00:00:00 2001 From: Sam Lavigne Date: Sat, 2 Sep 2023 11:03:58 -0400 Subject: [PATCH] fix command generation --- src/stores.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores.js b/src/stores.js index 369a168..1f6b035 100644 --- a/src/stores.js +++ b/src/stores.js @@ -105,6 +105,7 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => { const eid = edgeIds[i.id]; if (eid) { if (typeof eid == "string" && eid.includes(":")) cmd.weight = -1000; + else cmd.weight = eid; cmd.in.push(eid); } } @@ -115,7 +116,6 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => { const eid = edgeIds[o.id]; if (eid) { if (typeof eid == "string" && eid.includes("out")) cmd.weight = 1000; - else cmd.weight = eid; cmd.out.push(eid); } } @@ -151,7 +151,7 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => { let fg = `"${filtergraph.join(";")}"`; // this crazy thing replaces stuff like [1];[1] with a comma! - fg = fg.replaceAll(/(\[\d+\]);\1(?!\[)/g, ","); + fg = fg.replaceAll(/(?