diff options
author | yunahi <60233430+yunahi@users.noreply.github.com> | 2020-07-28 01:53:21 +0900 |
---|---|---|
committer | yunahi <60233430+yunahi@users.noreply.github.com> | 2020-07-28 01:53:21 +0900 |
commit | e8caa12dc736ef66741b5652425b0cb8b0a5eb16 (patch) | |
tree | afd47f6b46d1d9c1d814650b2590b738cd36c495 /src/client/util/InteractionUtils.tsx | |
parent | f3a331573be09115f9a92b8e927081f8f743c478 (diff) | |
parent | f869c7a75eb6a2f6e6301aa76c57e383b41d3fea (diff) |
merge fix
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 69256ce67..3a7fd7626 100644 --- a/src/client/util/InteractionUtils.tsx +++ b/src/client/util/InteractionUtils.tsx @@ -121,7 +121,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(); + } } if (isNaN(scalex)) { scalex = 1; @@ -171,7 +175,6 @@ export namespace InteractionUtils { // return ( // InkOptionsMenu.Instance.getColors().map(color => { // const id1 = "arrowStartTest" + color; - // console.log(color); // <marker id={id1} orient="auto" overflow="visible" refX="0" refY="1" markerWidth="10" markerHeight="7"> // <polygon points="0 0, 3 1, 0 2" fill={"#" + color} /> // </marker>; @@ -412,7 +415,6 @@ export namespace InteractionUtils { // let dist12 = TwoPointEuclidist(pt1, pt2); // let dist23 = TwoPointEuclidist(pt2, pt3); // let dist13 = TwoPointEuclidist(pt1, pt3); - // console.log(`distances: ${dist12}, ${dist23}, ${dist13}`); // let dist12close = dist12 < leniency; // let dist23close = dist23 < leniency; // let dist13close = dist13 < leniency; |