Updated the use of "National" to "Country" and renamed some directories.
Added a second larger AngledFlag to the Workspace (because changes that affect the larger size might be hidden by a smaller flag).
Added missing flag for Poland (both original and 2:1 "angled" style).
Added correct 2:1 flags for Mexico and Monaco.
More overlay images (to help with driver number coloring).
It's not 100% complete - I still need to add the second, slightly offset sub flag that goes beneath the main flag, creating a sort of refractive-glass/parallax effect.
Needed to add a new workspace. Thankfully it's pretty easy to add a new workspace. So, kinda nice.
Did a lot of work making 2:1 versions of each flag in vector. Was a bit of a pain in the ass.
Renamed a prop for ProgressSlider, "onBarColor" because prefixing a prop with "on" is special for React and it gets upset and spits out an error.
Added a great new feature: an active outline styling rule. When dragging the overlay image around there's now a red outline to help match edges that are otherwise black-on-black; making them very difficult to align.
A lot of work going on here.
* Moved WorkspaceControls component to a new sub directory
* Renamed overlay images
* Started a static ChyronDriverBasic component (using Hamilton as an example)
* Created a fancy DriverNumber rendering system
* Defined DriverNumber style for Mercedes and no one else yet
* A bunch of new states for the grid: cars, drivers, teams, etc
* Defined a bunch of data for the drivers and teams
* Created another string utility function to generate repeat strings; unit tests included
Okay. I'm content with what I've made. It's not really up to the level of "oh man, package this up as a library and put it out on NPM!" but it works OK for my specific situation.
I ran into too many issues with the percentage value being buggy when the overlay wasn't visible.
I'm still running into issues where useMeasure isn't populating fast enough and the left prop isn't being set correctly.
I'm sure, if I really wanted to, I could find a two step process of loading at 0 opacity, finding the dimensions, and then moving it to the center and revealing it. But I don't have the desire.
Still. I went ahead and added workspace properties to the central state and read from them when it makes sense.
Shout-out to Blair Wadman for revealing a method to display an image at 1:1 pixel scale and having the div that houses it automatically match that size without any fuss. (Here: https://befused.com/css/flexbox-prevent-image-shrinking/).
Total change to workspaces. Now an object instead of a list.
Utilizing workspace overlays list - prototype currently colors the mock item.
Reset overlay on workspace change.
Improved combined dragging/transition element behavior.
The secret? Don't! Use another throw-away div and put it around the draggable div.
Also adopted animated.div into the Styled-Component. Really cool how it just works.
* Moved FullScreenContainer in WorkspacesRoute to make scrolling much better. Seriously, 100% works better.
* Simplified dimensions state actions to a shared one.
* Abandoned the noisy and useless "AnimatedBG" type.
* Added workspace dimensions state (I'll need this later to prevent off-screen dragging).
* Placed OverlayDisplay component in PreviewWindow, where it makes more sense. I'll still allow it to roam around outside of it, though.
* Renamed "menu" dimensions to "mainMenu".
* Improved initNewOverlayItem action to support setting visible.
* Correct handling of showing the OverlayItemContainer.
* Simplified the initial position of a new OverlayItem to a simple initial value instead of setting it in the middle of provided dimensions.
* Made PreviewWindow `position: relative` to allow absolute positioning of OverlayItem from it.
* Added importHelpers to tsconfig because VSCode was complaining about it.
Added a subtle background color transition.
Gave up on the idea of giving the toggle circle a shadow (not worth the hassle). But if I did decide to do that, I'd be able to animate the toggle circle fairly easily, I think.
Think there is some improvements I can make, though. The toggle circle on iOS has the drop shadow - not the body (with an inset shadow). But because I'm using absolute positioning the shadow overflows outside the the toggle body. So. I'll need to switch to using some other positioning rule