Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Jun 21, 2023
1 parent 8fb0772 commit a55c5c4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions web/src/components/TimelineEventOverlay.jsx
@@ -1,6 +1,5 @@
import { Fragment, h } from 'preact';
import { useCallback, useState } from 'preact/hooks';
import Heading from './Heading';
import { useState } from 'preact/hooks';

export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig }) {
const boxLeftEdge = Math.round(eventOverlay.data.box[0] * 100);
Expand Down Expand Up @@ -31,9 +30,9 @@ export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig
};

const getObjectRatio = () => {
const width = eventOverlay.data.box[2];
const height = eventOverlay.data.box[3];
return Math.round(100 * width / height) / 100;
const width = eventOverlay.data.box[2] * 100;
const height = eventOverlay.data.box[3] * 100;
return Math.round(100 * (width / height)) / 100;
};

return (
Expand Down

0 comments on commit a55c5c4

Please sign in to comment.