Change color of bottom center box

This commit is contained in:
Nick Mowen 2023-04-23 07:11:55 -06:00
parent 08ce46b1d9
commit e089bae383

View File

@ -615,18 +615,18 @@ export default function Events({ path, ...props }) {
this.player = null; this.player = null;
}} }}
> >
{eventOverlay ? ( {eventOverlay ? (
<div <div
className="absolute border-4 border-red-600" className="absolute border-4 border-red-600"
style={{left: `${Math.round( style={{
eventOverlay.data.box[0] * 100 left: `${Math.round(eventOverlay.data.box[0] * 100)}%`,
)}%`, top: `${Math.round(eventOverlay.data.box[1] * 100)}%`, right: `${Math.round( top: `${Math.round(eventOverlay.data.box[1] * 100)}%`,
(1 - eventOverlay.data.box[2]) * 100 right: `${Math.round((1 - eventOverlay.data.box[2]) * 100)}%`,
)}%`, bottom: `${Math.round((1 - eventOverlay.data.box[3]) * 100)}%`}} bottom: `${Math.round((1 - eventOverlay.data.box[3]) * 100)}%`,
}}
> >
{eventOverlay.class_type == 'entered_zone' ? ( {eventOverlay.class_type == 'entered_zone' ? (
<div className="absolute w-2 h-2 bg-red-600 left-[50%] bottom-0" /> <div className="absolute w-2 h-2 bg-yellow-500 left-[50%] bottom-0" />
) : null} ) : null}
</div> </div>
) : null} ) : null}