Adjusted the method that placement is determined. It didn't make much sense to define Placement in state, so I've moved it to the central theme object instead.
I also took the time to support +10 laps and minutes with a special xScale setting for the TimingTowerRows.
The issue is, say our scale is 50%. A PositionFlag on the TimingBoard is normally 32x32px in size. That means that the size of the actual PositionFlag while scaled is 16x16.
The WipeTransition component takes the effective size of its child element using the useMeasure() hook. So it sees the size is 16x16, thus, when the wipe is set to visible its clip dimensions on the opposite and adjacent points of the triangle are 16px away from origin.
But because we're scaled at 50% that clip path effectively becomes 8px. The clip path is doubly scaled. As a result I'm seeing white squares in the corner of the PositionFlag component.
I think I might be able to solve this by using simple division to express the values of the clip path in percentages. Or I'll find a way to avoid the double scaling issue.
I flipped the way the wipe effect works. Originally there was the complicated problem of revealing a flag instantly and then wiping it away, requiring some delicate work with mounting and unmounting components. Instead it now works by always having a colored PositionFlag component in place and temporarily disappearing the normal PositionFlag (that is on top of it) using a transition-free opacity switch that lets the WipeTransition work reliably. This makes for fewer states and conditional renders.
Added textColor and bgColor props to the PositionFlag component for flexibility.
Now we can define separate opening and closing transition settings as well as common (both ways) transition props.
This is all pretty cool.
Timing for open/close animations and transitions are looking better and more mature.
Discovered a limitation with WipeTransition and added a new optional prop for manual dimension definition.
Going to attempt using a mask image next instead as the animation fades the name in, not using a direct clip.
Refactored outlineClipPath() to support outlines that have been offset to be inside.
Added animation duration configuration to the TimingBoard workspace.
New reducers for event slice that allow increasing of car distances, awarding fastest laps, and changing the statuses of cars.
Updating more types to enums, which are just better in most cases as far as I can tell.
Fixed the bottom rounding functionality between running and retired cars in a reliable way.
Relying more on car.position in the Timing Tower, as it should be.
Timing Board is the combination of all elements on the left side of the screen, including the Status Indicator component (not written yet) that is visible whenever there are cars on track.