From 7598acea738753bf20969fa42ec08e06db0479a6 Mon Sep 17 00:00:00 2001 From: miyanokomiya Date: Fri, 11 Oct 2024 17:44:21 +0900 Subject: [PATCH] feat: Highlight target vertex when the head menu gets hovered --- src/components/floatMenu/FloatMenu.tsx | 17 ++++- src/components/floatMenu/LineHeadItems.tsx | 72 ++++++++++++++-------- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/src/components/floatMenu/FloatMenu.tsx b/src/components/floatMenu/FloatMenu.tsx index cf606291..512b04e6 100644 --- a/src/components/floatMenu/FloatMenu.tsx +++ b/src/components/floatMenu/FloatMenu.tsx @@ -42,6 +42,7 @@ import { ShapeTypeButton } from "./ShapeTypeButton"; import { patchLinesConnectedToShapeOutline } from "../../composables/lineSnapping"; import { isLinePolygonShape } from "../../shapes/polygons/linePolygon"; import { canMakePolygon, patchLineFromLinePolygon, patchLinePolygonFromLine } from "../../shapes/utils/linePolygon"; +import { HighlightShapeMeta } from "../../composables/states/appCanvas/core"; // Use default root height until it's derived from actual element. // => It's useful to prevent the menu from slightly translating at the first appearance. @@ -220,6 +221,18 @@ export const FloatMenu: React.FC