Skip to content

Commit 680eddd

Browse files
committed
Add missing property to data points
1 parent 02c0c46 commit 680eddd

File tree

4 files changed

+1157
-1182
lines changed

4 files changed

+1157
-1182
lines changed

__tests__/SignaturePad.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,16 @@ describe('Component', () => {
146146
render(<SignaturePad ref={instance} redrawOnResize />);
147147

148148
const signaturePad = instance.current as SignaturePad;
149+
const canvas = signaturePad.canvas.current as HTMLCanvasElement;
150+
const context = canvas.getContext('2d') as CanvasRenderingContext2D;
149151
const data = [
150152
{
151153
dotSize: 0,
152154
maxWidth: 2.5,
153155
minWidth: 0.5,
154156
penColor: 'black',
155157
velocityFilterWeight: 0.7,
158+
compositeOperation: context.globalCompositeOperation,
156159
points: [{ pressure: 0.5, time: 1641476147709, x: 100, y: 100 }],
157160
},
158161
];

example/package-lock.json

Lines changed: 45 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)