more command generator bug fixes
This commit is contained in:
parent
5b4ce1fe26
commit
4552ff5b51
|
@ -55,7 +55,8 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
|
||||||
|
|
||||||
// create edge labels for each filter
|
// create edge labels for each filter
|
||||||
function traverseEdges(edg, type) {
|
function traverseEdges(edg, type) {
|
||||||
const outEdges = $edges.filter((e) => e.source === edg.target && (e.sourceHandle.includes(type) || e.sourceHandle.includes("n")));
|
// const outEdges = $edges.filter((e) => e.source === edg.target && (e.sourceHandle.includes(type) || e.sourceHandle.includes("n")));
|
||||||
|
const outEdges = $edges.filter((e) => e.source === edg.target);
|
||||||
|
|
||||||
let label;
|
let label;
|
||||||
|
|
||||||
|
@ -102,18 +103,22 @@ export const previewCommand = derived([edges, nodes], ([$edges, $nodes]) => {
|
||||||
|
|
||||||
for (let i of ins) {
|
for (let i of ins) {
|
||||||
const eid = edgeIds[i.id];
|
const eid = edgeIds[i.id];
|
||||||
|
if (eid) {
|
||||||
if (typeof eid == "string" && eid.includes(":")) cmd.weight = -1000;
|
if (typeof eid == "string" && eid.includes(":")) cmd.weight = -1000;
|
||||||
cmd.in.push(eid);
|
cmd.in.push(eid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cmd.cmd = makeFilterArgs(n.data);
|
cmd.cmd = makeFilterArgs(n.data);
|
||||||
|
|
||||||
for (let o of outs) {
|
for (let o of outs) {
|
||||||
const eid = edgeIds[o.id];
|
const eid = edgeIds[o.id];
|
||||||
|
if (eid) {
|
||||||
if (typeof eid == "string" && eid.includes("out")) cmd.weight = 1000;
|
if (typeof eid == "string" && eid.includes("out")) cmd.weight = 1000;
|
||||||
else cmd.weight = eid;
|
else cmd.weight = eid;
|
||||||
cmd.out.push(eid);
|
cmd.out.push(eid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
filtergraph.push(cmd);
|
filtergraph.push(cmd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue