mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Further adjustments for edge cases
This commit is contained in:
parent
c7c6a4c3f1
commit
9a2bd18904
3 changed files with 40 additions and 31 deletions
|
@ -391,6 +391,10 @@ const handleSegmentRelease = (
|
|||
null,
|
||||
);
|
||||
|
||||
if (!restoredPoints) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const nextPoints: GlobalPoint[] = [];
|
||||
|
||||
// First part of the arrow are the old points
|
||||
|
@ -2181,16 +2185,11 @@ const normalizeArrowElementUpdate = (
|
|||
nextFixedSegments: readonly FixedSegment[] | null,
|
||||
startIsSpecial?: ExcalidrawElbowArrowElement["startIsSpecial"],
|
||||
endIsSpecial?: ExcalidrawElbowArrowElement["startIsSpecial"],
|
||||
): {
|
||||
points: LocalPoint[];
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
fixedSegments: readonly FixedSegment[] | null;
|
||||
startIsSpecial?: ExcalidrawElbowArrowElement["startIsSpecial"];
|
||||
endIsSpecial?: ExcalidrawElbowArrowElement["startIsSpecial"];
|
||||
} => {
|
||||
): ElementUpdate<ExcalidrawElbowArrowElement> => {
|
||||
if (global.length === 0) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const offsetX = global[0][0];
|
||||
const offsetY = global[0][1];
|
||||
let points = global.map((p) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue