mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-08 10:07:04 +02:00
add stroke/pressure sensitivity to freedraw
This commit is contained in:
@@ -445,6 +445,7 @@ export const newFreeDrawElement = (
|
||||
points?: ExcalidrawFreeDrawElement["points"];
|
||||
simulatePressure: boolean;
|
||||
pressures?: ExcalidrawFreeDrawElement["pressures"];
|
||||
pressureSensitivity?: ExcalidrawFreeDrawElement["pressureSensitivity"];
|
||||
} & ElementConstructorOpts,
|
||||
): NonDeleted<ExcalidrawFreeDrawElement> => {
|
||||
return {
|
||||
@@ -453,6 +454,7 @@ export const newFreeDrawElement = (
|
||||
pressures: opts.pressures || [],
|
||||
simulatePressure: opts.simulatePressure,
|
||||
lastCommittedPoint: null,
|
||||
pressureSensitivity: opts.pressureSensitivity ?? 1,
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user