diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-05-15 13:26:37 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-05-15 13:26:37 -0500 |
commit | 4bca98333ada6536a1bf2ecf1681c5c17a3a1ae1 (patch) | |
tree | 7fc20099971de42756af3d238e2ea4f9a608cbd3 /src/client/util/InteractionUtils.tsx | |
parent | 0f54ef61653213bd1b26300cb7d14e3da71d1eea (diff) | |
parent | 98c7540fff67c232c1b04f2130ee624f9a70afbd (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into script_documents
Diffstat (limited to 'src/client/util/InteractionUtils.tsx')
-rw-r--r-- | src/client/util/InteractionUtils.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/util/InteractionUtils.tsx b/src/client/util/InteractionUtils.tsx index b1f136430..3a5345c80 100644 --- a/src/client/util/InteractionUtils.tsx +++ b/src/client/util/InteractionUtils.tsx @@ -87,15 +87,17 @@ export namespace InteractionUtils { return myTouches; } - export function CreatePolyline(points: { X: number, Y: number }[], left: number, top: number, color: string, width: number) { + export function CreatePolyline(points: { X: number, Y: number }[], left: number, top: number, color: string, width: string) { const pts = points.reduce((acc: string, pt: { X: number, Y: number }) => acc + `${pt.X - left},${pt.Y - top} `, ""); return ( <polyline points={pts} style={{ fill: "none", - stroke: color, - strokeWidth: width + stroke: color ?? "rgb(0, 0, 0)", + strokeWidth: parseInt(width), + strokeLinejoin: "round", + strokeLinecap: "round" }} /> ); |