mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: freehand points (#4031)
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
982cba2035
commit
00c6940851
6 changed files with 49 additions and 24 deletions
|
@ -804,7 +804,7 @@ export function getFreeDrawSvgPath(element: ExcalidrawFreeDrawElement) {
|
|||
smoothing: 0.5,
|
||||
streamline: 0.5,
|
||||
easing: (t) => Math.sin((t * Math.PI) / 2), // https://easings.net/#easeOutSine
|
||||
last: false,
|
||||
last: !!element.lastCommittedPoint, // LastCommittedPoint is added on pointerup
|
||||
};
|
||||
|
||||
return getSvgPathFromStroke(getStroke(inputPoints as number[][], options));
|
||||
|
@ -839,5 +839,5 @@ function getSvgPathFromStroke(points: number[][]): string {
|
|||
["M", points[0], "Q"],
|
||||
)
|
||||
.join(" ")
|
||||
.replaceAll(TO_FIXED_PRECISION, "$1");
|
||||
.replace(TO_FIXED_PRECISION, "$1");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue