From 7d521d933483838d1619080a4a6a0e6b972c3c28 Mon Sep 17 00:00:00 2001 From: Forrest Date: Fri, 15 Sep 2023 12:55:36 -0400 Subject: [PATCH] fix(polygon): remove movePoint state This state should not be stored inside the tool. --- src/components/tools/polygon/PolygonSVG2D.vue | 3 ++- .../tools/polygon/PolygonWidget2D.vue | 26 ++++++++++++------- src/store/tools/polygons.ts | 1 - 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/components/tools/polygon/PolygonSVG2D.vue b/src/components/tools/polygon/PolygonSVG2D.vue index bcc5e6d82..4d5ffc87d 100644 --- a/src/components/tools/polygon/PolygonSVG2D.vue +++ b/src/components/tools/polygon/PolygonSVG2D.vue @@ -37,6 +37,7 @@ import { watch, inject, } from 'vue'; +import { Maybe } from '@/src/types'; const POINT_RADIUS = 10; const FINISHABLE_POINT_RADIUS = 16; @@ -53,7 +54,7 @@ export default defineComponent({ required: true, }, movePoint: { - type: Array as unknown as PropType, + type: Array as unknown as PropType>, }, placing: { type: Boolean, diff --git a/src/components/tools/polygon/PolygonWidget2D.vue b/src/components/tools/polygon/PolygonWidget2D.vue index 9ebf50a68..ec0d213a7 100644 --- a/src/components/tools/polygon/PolygonWidget2D.vue +++ b/src/components/tools/polygon/PolygonWidget2D.vue @@ -1,6 +1,7 @@