mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
change line order so edges are more easily clickable
This commit is contained in:
parent
5b26a14d02
commit
1be3b9fb7c
@ -122,6 +122,21 @@ export default function PolygonDrawer({
|
||||
onDragEnd={isActive ? handleGroupDragEnd : undefined}
|
||||
dragBoundFunc={isActive ? groupDragBound : undefined}
|
||||
>
|
||||
<Line
|
||||
name="filled-line"
|
||||
points={flattenedPoints}
|
||||
stroke={colorString(true)}
|
||||
strokeWidth={3}
|
||||
hitStrokeWidth={12}
|
||||
closed={isFinished}
|
||||
fill={colorString(isActive || isHovered ? true : false)}
|
||||
onMouseOver={() =>
|
||||
isFinished ? setCursor("move") : setCursor("crosshair")
|
||||
}
|
||||
onMouseOut={() =>
|
||||
isFinished ? setCursor("default") : setCursor("crosshair")
|
||||
}
|
||||
/>
|
||||
{isFinished && isActive && (
|
||||
<Line
|
||||
name="unfilled-line"
|
||||
@ -135,21 +150,6 @@ export default function PolygonDrawer({
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<Line
|
||||
name="filled-line"
|
||||
points={flattenedPoints}
|
||||
stroke={colorString(true)}
|
||||
strokeWidth={3}
|
||||
closed={isFinished}
|
||||
fill={colorString(isActive || isHovered ? true : false)}
|
||||
onMouseOver={() =>
|
||||
isFinished ? setCursor("move") : setCursor("crosshair")
|
||||
}
|
||||
onMouseOut={() =>
|
||||
isFinished ? setCursor("default") : setCursor("crosshair")
|
||||
}
|
||||
/>
|
||||
|
||||
{points.map((point, index) => {
|
||||
if (!isActive) {
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user