format
continuous-integration/drone/push Build is passing Details

pull/84/head
maxime 1 year ago
parent 368acee92e
commit 6fda4d61d7

@ -116,7 +116,8 @@ export default function BendableArrow({
const styleWidth = style?.width ?? ArrowStyleDefaults.width const styleWidth = style?.width ?? ArrowStyleDefaults.width
const computeInternalSegments = useCallback((segments: Segment[]) => { const computeInternalSegments = useCallback(
(segments: Segment[]) => {
return segments.map((segment, idx) => { return segments.map((segment, idx) => {
if (idx == 0) { if (idx == 0) {
return { return {
@ -132,7 +133,9 @@ export default function BendableArrow({
end: segment.next, end: segment.next,
} }
}) })
}, [segments, startPos]) },
[segments, startPos],
)
// Cache the segments so that when the user is changing the segments (it moves an ArrowPoint), // Cache the segments so that when the user is changing the segments (it moves an ArrowPoint),
// it does not unwind to this arrow's component parent until validated. // it does not unwind to this arrow's component parent until validated.
@ -151,8 +154,6 @@ export default function BendableArrow({
const headRef = useRef<HTMLDivElement>(null) const headRef = useRef<HTMLDivElement>(null)
const tailRef = useRef<HTMLDivElement>(null) const tailRef = useRef<HTMLDivElement>(null)
/** /**
* Computes and return the segments edition points * Computes and return the segments edition points
* @param parentBase * @param parentBase

Loading…
Cancel
Save