fix: freehand points (#4031)
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user