diff options
author | bobzel <zzzman@gmail.com> | 2021-11-29 14:09:17 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-11-29 14:09:17 -0500 |
commit | 061dab5285d3a334a258d8097a6e95b065b30de3 (patch) | |
tree | 0f77cdacae4330e0588538b3ba5f3445616a0530 /src/client/util/InteractionUtils.tsx | |
parent | 7e6baacfe6c1b55a3fe1807903455f9ff3844d74 (diff) |
added moving ink stroke segments. added stretching and rotating ink strokes about opposite end point.
Diffstat (limited to 'src/client/util/InteractionUtils.tsx')
-rw-r--r-- | src/client/util/InteractionUtils.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/InteractionUtils.tsx b/src/client/util/InteractionUtils.tsx index a32a8eecc..4eb0be320 100644 --- a/src/client/util/InteractionUtils.tsx +++ b/src/client/util/InteractionUtils.tsx @@ -91,7 +91,8 @@ export namespace InteractionUtils { export function CreatePolyline(points: { X: number, Y: number }[], left: number, top: number, color: string, width: number, strokeWidth: number, lineJoin: string, lineCap: string, bezier: string, fill: string, arrowStart: string, arrowEnd: string, - dash: string | undefined, scalex: number, scaley: number, shape: string, pevents: string, opacity: number, nodefs: boolean) { + dash: string | undefined, scalex: number, scaley: number, shape: string, pevents: string, opacity: number, nodefs: boolean, + downHdlr?: ((e: React.PointerEvent) => void)) { const pts = shape ? makePolygon(shape, points) : points; if (isNaN(scalex)) scalex = 1; @@ -107,7 +108,7 @@ export namespace InteractionUtils { const Tag = (bezier ? "path" : "polyline") as keyof JSX.IntrinsicElements; const makerStrokeWidth = strokeWidth / 2; - return (<svg fill={color}> {/* setting the svg fill sets the arrowStart fill */} + return (<svg fill={color} onPointerDown={downHdlr}> {/* setting the svg fill sets the arrowStart fill */} {nodefs ? (null) : <defs> {arrowStart !== "dot" && arrowEnd !== "dot" ? (null) : <marker id={`dot${defGuid}`} orient="auto" markerUnits="userSpaceOnUse" refX={0} refY="0" overflow="visible"> |