aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/InteractionUtils.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-07-20 19:27:53 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-07-20 19:27:53 +0530
commit2d16c23cf8af25601b34e44b951ce108673831e4 (patch)
tree394a23ccfe452efead3550febd00b6bea087a73b /src/client/util/InteractionUtils.tsx
parent7b7d83f6f7070334fdfc4dd7cca03699b8e21078 (diff)
parentd21ef189f2c160d3d80a5cf7d824c314262a59ac (diff)
merge conflicts
Diffstat (limited to 'src/client/util/InteractionUtils.tsx')
-rw-r--r--src/client/util/InteractionUtils.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/InteractionUtils.tsx b/src/client/util/InteractionUtils.tsx
index 07adbb8b1..473d4a263 100644
--- a/src/client/util/InteractionUtils.tsx
+++ b/src/client/util/InteractionUtils.tsx
@@ -112,7 +112,11 @@ export namespace InteractionUtils {
}
}
} else {
- pts = points;
+ pts = points.slice();
+ // bcz: Ugh... this is ugly, but shapes apprently have an extra point added that is = (p[0].x,p[0].y+1) as some sort of flag. need to remove it here.
+ if (pts.length > 2 && pts[pts.length - 2].X === pts[0].X && pts[pts.length - 2].Y === pts[0].Y) {
+ pts.pop();
+ }
}
const strpts = pts.reduce((acc: string, pt: { X: number, Y: number }) => acc +
`${(pt.X - left - width / 2) * scalex + width / 2},