forked from Github/frigate
Fix linter and fix lint issues (#10141)
This commit is contained in:
@@ -14,19 +14,6 @@ export default function TimelineEventOverlay({
|
||||
timeline,
|
||||
cameraConfig,
|
||||
}: TimelineEventOverlayProps) {
|
||||
if (!timeline.data.box) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const boxLeftEdge = Math.round(timeline.data.box[0] * 100);
|
||||
const boxTopEdge = Math.round(timeline.data.box[1] * 100);
|
||||
const boxRightEdge = Math.round(
|
||||
(1 - timeline.data.box[2] - timeline.data.box[0]) * 100
|
||||
);
|
||||
const boxBottomEdge = Math.round(
|
||||
(1 - timeline.data.box[3] - timeline.data.box[1]) * 100
|
||||
);
|
||||
|
||||
const [isHovering, setIsHovering] = useState<boolean>(false);
|
||||
const getHoverStyle = () => {
|
||||
if (!timeline.data.box) {
|
||||
@@ -67,6 +54,19 @@ export default function TimelineEventOverlay({
|
||||
return Math.round(100 * (width / height)) / 100;
|
||||
};
|
||||
|
||||
if (!timeline.data.box) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const boxLeftEdge = Math.round(timeline.data.box[0] * 100);
|
||||
const boxTopEdge = Math.round(timeline.data.box[1] * 100);
|
||||
const boxRightEdge = Math.round(
|
||||
(1 - timeline.data.box[2] - timeline.data.box[0]) * 100,
|
||||
);
|
||||
const boxBottomEdge = Math.round(
|
||||
(1 - timeline.data.box[3] - timeline.data.box[1]) * 100,
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user