bug fix in line

This commit is contained in:
2025-07-14 09:48:02 +05:30
parent 99b51df468
commit 7a72d31008

View File

@@ -376,7 +376,7 @@ function Line({ points }: Readonly<LineProps>) {
handlePointClick(points);
}}
onPointerOver={(e) => {
if (!hoveredLine && selectedPoints.length === 0 && e.buttons === 0 && !e.ctrlKey) {
if (selectedPoints.length === 0 && e.buttons === 0 && !e.ctrlKey) {
setHoveredLine(points);
setIsHovered(true)
if (toolMode === 'move' && !hoveredPoint) {
@@ -385,9 +385,9 @@ function Line({ points }: Readonly<LineProps>) {
}
}}
onPointerOut={() => {
if (hoveredLine) {
if (hoveredLine && isHovered) {
setHoveredLine(null);
if(!hoveredPoint){
if (!hoveredPoint) {
handleCanvasCursors('default');
}
}