From 730435b36a243cf79bd57c8a6b72d07433c03c83 Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Tue, 3 Sep 2024 16:46:49 +0900 Subject: [PATCH] =?UTF-8?q?Design:=20=EC=BA=94=EB=B2=84=EC=8A=A4=20anchor?= =?UTF-8?q?=20=EC=82=AC=EC=9D=B4=EC=A6=88=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ImageCanvas/LabelRect.tsx | 2 +- .../components/ImageCanvas/PolygonTransformer.tsx | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/ImageCanvas/LabelRect.tsx b/frontend/src/components/ImageCanvas/LabelRect.tsx index 8343407..53b7cef 100644 --- a/frontend/src/components/ImageCanvas/LabelRect.tsx +++ b/frontend/src/components/ImageCanvas/LabelRect.tsx @@ -58,7 +58,7 @@ export default function LabelRect({ keepRatio={false} ref={trRef} rotateEnabled={false} - anchorSize={4} + anchorSize={8} rotateAnchorCursor="pointer" rotateAnchorOffset={20} ignoreStroke={true} diff --git a/frontend/src/components/ImageCanvas/PolygonTransformer.tsx b/frontend/src/components/ImageCanvas/PolygonTransformer.tsx index eecaa72..2691c86 100644 --- a/frontend/src/components/ImageCanvas/PolygonTransformer.tsx +++ b/frontend/src/components/ImageCanvas/PolygonTransformer.tsx @@ -34,15 +34,14 @@ export default function PolygonTransformer({ coordinates, setCoordinates, stage }; const handleMouseOver = (e: Konva.KonvaEventObject) => { const circle = e.target as Konva.Circle; - circle.strokeWidth(2); - circle.radius(4); + + circle.radius(7); stage.batchDraw(); }; const handleMouseOut = (e: Konva.KonvaEventObject) => { const circle = e.target as Konva.Circle; - const stage = circle.getStage(); - circle.strokeWidth(1); - circle.radius(2); + + circle.radius(5); stage?.batchDraw(); }; @@ -77,6 +76,7 @@ export default function PolygonTransformer({ coordinates, setCoordinates, stage strokeScaleEnabled={true} closed zIndex={1} + perfectDrawEnabled={false} /> {coordinates.map((point, index) => { return ( @@ -84,7 +84,7 @@ export default function PolygonTransformer({ coordinates, setCoordinates, stage key={index} x={point[0]} y={point[1]} - radius={2} + radius={5} stroke="#00a1ff" strokeWidth={1} fill="white" @@ -93,6 +93,7 @@ export default function PolygonTransformer({ coordinates, setCoordinates, stage onMouseOver={handleMouseOver} onMouseOut={handleMouseOut} scale={{ x: 1 / stage.getAbsoluteScale().x, y: 1 / stage.getAbsoluteScale().y }} + perfectDrawEnabled={false} /> ); })}