mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-23 10:17:02 +02:00
compute midpoints properly when dealing with split line indices
This commit is contained in:
@@ -547,7 +547,10 @@ export class LinearElementEditor {
|
||||
endPointIndex: number,
|
||||
) {
|
||||
let segmentMidPoint = centerPoint(startPoint, endPoint);
|
||||
if (element.points.length > 2 && element.roundness) {
|
||||
const splits = element.segmentSplitIndices || [];
|
||||
const treatAsCurve =
|
||||
splits.includes(endPointIndex) || splits.includes(endPointIndex - 1);
|
||||
if (element.points.length > 2 && (element.roundness || treatAsCurve)) {
|
||||
const controlPoints = getControlPointsForBezierCurve(
|
||||
element,
|
||||
element.points[endPointIndex],
|
||||
|
Reference in New Issue
Block a user