chore: ts-ignore errors

This commit is contained in:
Sidharth Vinod
2024-08-21 17:12:03 +05:30
parent c1cd39bd65
commit 01b5935a4e

View File

@@ -71,6 +71,7 @@ const addVertex = async (nodeEl: any, graph: { children: any[] }, nodeArr: any,
await addVertices(nodeEl, nodeArr, child, node.id); await addVertices(nodeEl, nodeArr, child, node.id);
if (node.label) { if (node.label) {
// @ts-ignore TODO: fix this
const { shapeSvg, bbox } = await labelHelper(nodeEl, node, undefined, true); const { shapeSvg, bbox } = await labelHelper(nodeEl, node, undefined, true);
labelData.width = bbox.width; labelData.width = bbox.width;
labelData.wrappingWidth = getConfig().flowchart!.wrappingWidth; labelData.wrappingWidth = getConfig().flowchart!.wrappingWidth;
@@ -230,12 +231,14 @@ const getNextPort = (node: string | number, edgeDirection: string, graphDirectio
const result = edgeDirection === 'in' ? portPos[node].inPosition : portPos[node].outPosition; const result = edgeDirection === 'in' ? portPos[node].inPosition : portPos[node].outPosition;
if (edgeDirection === 'in') { if (edgeDirection === 'in') {
// @ts-ignore TODO: fix this
portPos[node].inPosition = getNextPosition( portPos[node].inPosition = getNextPosition(
portPos[node].inPosition, portPos[node].inPosition,
edgeDirection, edgeDirection,
graphDirection graphDirection
); );
} else { } else {
// @ts-ignore TODO: fix this
portPos[node].outPosition = getNextPosition( portPos[node].outPosition = getNextPosition(
portPos[node].outPosition, portPos[node].outPosition,
edgeDirection, edgeDirection,
@@ -439,6 +442,7 @@ const addEdges = async function (
} else if (edges.defaultInterpolate !== undefined) { } else if (edges.defaultInterpolate !== undefined) {
edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear); edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);
} else { } else {
// @ts-ignore TODO: fix this
edgeData.curve = interpolateToCurve(conf.curve, curveLinear); edgeData.curve = interpolateToCurve(conf.curve, curveLinear);
} }
@@ -471,6 +475,7 @@ const addEdges = async function (
log.debug('abc78 source and target', source, target); log.debug('abc78 source and target', source, target);
// Add the edge to the graph // Add the edge to the graph
graph.edges.push({ graph.edges.push({
// @ts-ignore TODO: fix this
id: 'e' + edge.start + edge.end, id: 'e' + edge.start + edge.end,
...edge, ...edge,
sources: [source], sources: [source],