ISSUE-045 - Chyron Body - Done!

There ain't no way in hell I'm going to be able to convincingly animate the AngledFlag without spending maybe an entire week on it.
I would honestly want to re-do the entire AngledFlag component from scratch before trying to animate it. The combination of rules and styles and all that is just too confusing to attempt right now. So, a basic slide- and fade-in I think is decent enough work.
This commit is contained in:
Kyle Geib committed 2022-02-14 13:59:34 -05:00
1 parent bab056394c
commit 284b0919d6
2 files changed
+10 -3

No files matched your search

@@ -50,7 +50,9 @@ export function ChyronDriver({
const flagProps = flagMode === "country" const flagProps = flagMode === "country"
? { flagMode, flag: car.driver.nationality } ? { flagMode, flag: car.driver.nationality }
: flagMode === "team" ? { flagMode, flag: car.driver.team.id } : undefined; : flagMode === "team"
? { flagMode, flag: car.driver.team.id }
: undefined;
const dispatch = useDispatch(); const dispatch = useDispatch();
@@ -192,7 +194,11 @@ export function ChyronDriver({
open={openState !== 0} open={openState !== 0}
transitionProps={[{ transitionProps={[{
property: "opacity", property: "opacity",
duration: 500 * DDM, duration: 1200 * DDM,
delay: 1000 * DDM,
}, {
property: "right",
duration: 2000 * DDM,
delay: 1000 * DDM, delay: 1000 * DDM,
}]} }]}
height={baseHeight * 0.9} height={baseHeight * 0.9}
@@ -188,7 +188,8 @@ type FlagContainerProps = {
}; };
export const FlagContainer = styled.div<FlagContainerProps & TransitionProps>` export const FlagContainer = styled.div<FlagContainerProps & TransitionProps>`
position: absolute; position: absolute;
right: ${({ right }) => `${right}px`}; right: ${({ right, open }) => open ? right : right * -3}px;
z-index: -1;
display: flex; display: flex;
align-items: center; align-items: center;