aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkControlPtHandles.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/InkControlPtHandles.tsx')
-rw-r--r--src/client/views/InkControlPtHandles.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/InkControlPtHandles.tsx b/src/client/views/InkControlPtHandles.tsx
index 249a0fa64..8162f3fdc 100644
--- a/src/client/views/InkControlPtHandles.tsx
+++ b/src/client/views/InkControlPtHandles.tsx
@@ -11,6 +11,7 @@ import { UndoManager } from "../util/UndoManager";
import { Colors } from "./global/globalEnums";
import { InkStrokeProperties } from "./InkStrokeProperties";
import { List } from "../../fields/List";
+import { InkingStroke } from "./InkingStroke";
export interface InkControlProps {
inkDoc: Doc;
@@ -120,7 +121,7 @@ export class InkControlPtHandles extends React.Component<InkControlProps> {
}
const screenSpaceLineWidth = this.props.screenSpaceLineWidth;
- const closed = inkData.lastElement().X === inkData[0].X && inkData.lastElement().Y === inkData[0].Y;
+ const closed = InkingStroke.IsClosed(inkData);
const nearestScreenPt = this.props.nearestScreenPt();
const TagType = (broken?: boolean) => broken ? "rect" : "circle";
const hdl = (control: { X: number, Y: number, I: number }, scale: number, color: string) => {
@@ -147,7 +148,7 @@ export class InkControlPtHandles extends React.Component<InkControlProps> {
pointerEvents="all"
cursor="default"
/>;
- }
+ };
return (<svg>
{!nearestScreenPt ? (null) :
<circle key={"npt"}