fixing lint issues
Some checks failed
CI / Cargo Audit & Deny (push) Has been cancelled
CI / Web Blocking Checks (push) Has been cancelled
CI / Security Blocking Checks (push) Has been cancelled
CI / Web Advisory Checks (push) Has been cancelled
CI / Security Advisory Checks (push) Has been cancelled
CI / Rustfmt (push) Has started running
CI / Clippy (push) Has been cancelled
CI / Tests (push) Has been cancelled

This commit is contained in:
2026-03-11 11:56:57 -05:00
parent 765afc7d76
commit 1645ad84ee

View File

@@ -315,7 +315,6 @@ function getSegmentControlPoints(
function evaluatePathAtT( function evaluatePathAtT(
allPoints: { x: number; y: number }[], allPoints: { x: number; y: number }[],
t: number, t: number,
_selfLoop?: boolean,
): { x: number; y: number } { ): { x: number; y: number } {
if (allPoints.length < 2) { if (allPoints.length < 2) {
return allPoints[0] ?? { x: 0, y: 0 }; return allPoints[0] ?? { x: 0, y: 0 };
@@ -345,7 +344,6 @@ function evaluatePathAtT(
function projectOntoPath( function projectOntoPath(
allPoints: { x: number; y: number }[], allPoints: { x: number; y: number }[],
mousePos: { x: number; y: number }, mousePos: { x: number; y: number },
_selfLoop?: boolean,
): number { ): number {
if (allPoints.length < 2) return 0; if (allPoints.length < 2) return 0;
@@ -747,9 +745,9 @@ function WorkflowEdgesInner({
if (ds.type === "label" && ds.pathPoints) { if (ds.type === "label" && ds.pathPoints) {
// Project mouse onto path and snap the label to it // Project mouse onto path and snap the label to it
const t = projectOntoPath(ds.pathPoints, svgPos, ds.isSelfLoop); const t = projectOntoPath(ds.pathPoints, svgPos);
labelDragTRef.current = t; labelDragTRef.current = t;
const onCurve = evaluatePathAtT(ds.pathPoints, t, ds.isSelfLoop); const onCurve = evaluatePathAtT(ds.pathPoints, t);
setDragPos(onCurve); setDragPos(onCurve);
dragPosRef.current = onCurve; dragPosRef.current = onCurve;
} else { } else {
@@ -867,7 +865,7 @@ function WorkflowEdgesInner({
const svgPos = clientToSvg(e.clientX, e.clientY); const svgPos = clientToSvg(e.clientX, e.clientY);
// Initialise t from current label position // Initialise t from current label position
const initialT = projectOntoPath(allPoints, currentLabelPos, selfLoop); const initialT = projectOntoPath(allPoints, currentLabelPos);
labelDragTRef.current = initialT; labelDragTRef.current = initialT;
dragStateRef.current = { dragStateRef.current = {
@@ -1110,7 +1108,7 @@ function WorkflowEdgesInner({
} else { } else {
const t = const t =
edge.labelPosition ?? (usesDefaultSelfLoopRoute ? 0.62 : 0.5); edge.labelPosition ?? (usesDefaultSelfLoopRoute ? 0.62 : 0.5);
labelPos = evaluatePathAtT(allPoints, t, usesDefaultSelfLoopRoute); labelPos = evaluatePathAtT(allPoints, t);
} }
const arrowDirectionPoint = getArrowDirectionPoint(allPoints); const arrowDirectionPoint = getArrowDirectionPoint(allPoints);
const arrowHead = buildArrowHeadPath(arrowDirectionPoint, end); const arrowHead = buildArrowHeadPath(arrowDirectionPoint, end);