mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Fix lint
This commit is contained in:
parent
8fb0772fa9
commit
a55c5c42e5
@ -1,6 +1,5 @@
|
|||||||
import { Fragment, h } from 'preact';
|
import { Fragment, h } from 'preact';
|
||||||
import { useCallback, useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import Heading from './Heading';
|
|
||||||
|
|
||||||
export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig }) {
|
export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig }) {
|
||||||
const boxLeftEdge = Math.round(eventOverlay.data.box[0] * 100);
|
const boxLeftEdge = Math.round(eventOverlay.data.box[0] * 100);
|
||||||
@ -31,9 +30,9 @@ export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getObjectRatio = () => {
|
const getObjectRatio = () => {
|
||||||
const width = eventOverlay.data.box[2];
|
const width = eventOverlay.data.box[2] * 100;
|
||||||
const height = eventOverlay.data.box[3];
|
const height = eventOverlay.data.box[3] * 100;
|
||||||
return Math.round(100 * width / height) / 100;
|
return Math.round(100 * (width / height)) / 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user