From c8116e12ca16ca57208b0c00a2fc9fadf30f35fd Mon Sep 17 00:00:00 2001 From: DrummerHead Date: Wed, 11 Oct 2017 17:11:23 -0300 Subject: [PATCH] Use existing PointModel instead of new Point interface --- src/defaults/DefaultLinkWidget.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/defaults/DefaultLinkWidget.tsx b/src/defaults/DefaultLinkWidget.tsx index 5ba46a8..c4e8eab 100644 --- a/src/defaults/DefaultLinkWidget.tsx +++ b/src/defaults/DefaultLinkWidget.tsx @@ -16,17 +16,12 @@ export interface DefaultLinkState { selected: boolean; } -interface Point { - x: number; - y: number; -} - -const linePath = (firstPoint: Point, lastPoint: Point): string => +const linePath = (firstPoint: PointModel, lastPoint: PointModel): string => `M${firstPoint.x},${firstPoint.y} L ${lastPoint.x},${lastPoint.y}`; const curvePath = ( - firstPoint: Point, - lastPoint: Point, + firstPoint: PointModel, + lastPoint: PointModel, firstPointDelta: number = 0, lastPointDelta: number = 0 ): string =>