Skip to content

Commit

Permalink
Remove label and make overlay respect selected theme
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Jun 28, 2023
1 parent 6fb5fda commit e92916e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions web/src/components/TimelineEventOverlay.jsx
@@ -1,7 +1,7 @@
import { Fragment, h } from 'preact';
import { useState } from 'preact/hooks';

export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig }) {
export default function TimelineEventOverlay({ eventOverlay, cameraConfig }) {
const boxLeftEdge = Math.round(eventOverlay.data.box[0] * 100);
const boxTopEdge = Math.round(eventOverlay.data.box[1] * 100);
const boxRightEdge = Math.round((1 - eventOverlay.data.box[2] - eventOverlay.data.box[0]) * 100);
Expand Down Expand Up @@ -55,8 +55,7 @@ export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig
) : null}
</div>
{isHovering && (
<div className="absolute bg-slate-800 p-4 block text-white text-lg" style={getHoverStyle()}>
<div className="font-bold text-xl">{event.label} attributes:</div>
<div className="absolute bg-white dark:bg-slate-800 p-4 block dark:text-white text-lg" style={getHoverStyle()}>
<div>{`Area: ${getObjectArea()} px`}</div>
<div>{`Ratio: ${getObjectRatio()}`}</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion web/src/routes/Events.jsx
Expand Up @@ -719,7 +719,6 @@ export default function Events({ path, ...props }) {
>
{eventOverlay ? (
<TimelineEventOverlay
event={event}
eventOverlay={eventOverlay}
cameraConfig={config.cameras[event.camera]}
/>
Expand Down

0 comments on commit e92916e

Please sign in to comment.