|
|
@@ -8,7 +8,6 @@ import getStroke from 'perfect-freehand'
|
|
8
|
8
|
import {
|
|
9
|
9
|
getBoundsCenter,
|
|
10
|
10
|
getBoundsFromPoints,
|
|
11
|
|
- getRotatedCorners,
|
|
12
|
11
|
getSvgPathFromStroke,
|
|
13
|
12
|
translateBounds,
|
|
14
|
13
|
} from 'utils/utils'
|
|
|
@@ -27,7 +26,7 @@ const draw = registerShapeUtils<DrawShape>({
|
|
27
|
26
|
parentId: 'page0',
|
|
28
|
27
|
childIndex: 0,
|
|
29
|
28
|
point: [0, 0],
|
|
30
|
|
- points: [[0, 0]],
|
|
|
29
|
+ points: [],
|
|
31
|
30
|
rotation: 0,
|
|
32
|
31
|
isAspectRatioLocked: false,
|
|
33
|
32
|
isLocked: false,
|
|
|
@@ -50,7 +49,12 @@ const draw = registerShapeUtils<DrawShape>({
|
|
50
|
49
|
pathCache.set(
|
|
51
|
50
|
points,
|
|
52
|
51
|
getSvgPathFromStroke(
|
|
53
|
|
- getStroke(points, { size: +style.strokeWidth * 2, thinning: 0.9 })
|
|
|
52
|
+ getStroke(points, {
|
|
|
53
|
+ size: +style.strokeWidth * 2,
|
|
|
54
|
+ thinning: 0.9,
|
|
|
55
|
+ end: { taper: 100 },
|
|
|
56
|
+ start: { taper: 100 },
|
|
|
57
|
+ })
|
|
54
|
58
|
)
|
|
55
|
59
|
)
|
|
56
|
60
|
}
|