Skip to content

Commit

Permalink
change line order so edges are more easily clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye217 committed May 4, 2024
1 parent 5b26a14 commit 1be3b9f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions web/src/components/settings/PolygonDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,12 @@ export default function PolygonDrawer({
onDragEnd={isActive ? handleGroupDragEnd : undefined}
dragBoundFunc={isActive ? groupDragBound : undefined}
>
{isFinished && isActive && (
<Line
name="unfilled-line"
points={flattenedPoints}
hitStrokeWidth={12}
closed={isFinished}
fillEnabled={false}
onMouseOver={() => setCursor("crosshair")}
onMouseOut={() =>
isFinished ? setCursor("default") : setCursor("crosshair")
}
/>
)}
<Line
name="filled-line"
points={flattenedPoints}
stroke={colorString(true)}
strokeWidth={3}
hitStrokeWidth={12}
closed={isFinished}
fill={colorString(isActive || isHovered ? true : false)}
onMouseOver={() =>
Expand All @@ -149,7 +137,19 @@ export default function PolygonDrawer({
isFinished ? setCursor("default") : setCursor("crosshair")
}
/>

{isFinished && isActive && (
<Line
name="unfilled-line"
points={flattenedPoints}
hitStrokeWidth={12}
closed={isFinished}
fillEnabled={false}
onMouseOver={() => setCursor("crosshair")}
onMouseOut={() =>
isFinished ? setCursor("default") : setCursor("crosshair")
}
/>
)}
{points.map((point, index) => {
if (!isActive) {
return;
Expand Down

0 comments on commit 1be3b9f

Please sign in to comment.