ISSUE-053 - To avoid messing with code that already works I dropped in a function-function that will convert pixel values to percent values. This fix adds a little bit of overhead, I guess, but it works without munging up any clean looking code.

This commit is contained in:
Kyle Geib committed 2022-03-15 14:13:29 -05:00
1 parent b48579ac54
commit a11f5b8eb6
5 files changed
+64 -40

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ export function Layout({ headerHeight }: LayoutProps) {
>Timing Board UI</MockupBlock>
</LayoutGridItem>
<LayoutGridItem column={2} row={1} columnSpan={5} rowSpan={6} >
<LayoutGridItem column={2} row={1} columnSpan={5} rowSpan={7} >
<VideoFeed />
</LayoutGridItem>
@@ -33,7 +33,7 @@ export function Layout({ headerHeight }: LayoutProps) {
>Race Director UI</MockupBlock>
</LayoutGridItem>
<LayoutGridItem column={2} row={7} columnSpan={5} rowSpan={4}>
<LayoutGridItem column={2} row={8} columnSpan={5} rowSpan={3}>
<TimingTowerPrototypeControls />
</LayoutGridItem>
</LayoutGrid>
@@ -98,7 +98,7 @@ export function ChyronDriver({
progress,
5,
);
return `polygon(${coordinates.map(([x, y]) => `${x}px ${y}px`).join(", ")})`;
return `polygon(${coordinates.map(([x, y]) => `${x}% ${y}%`).join(", ")})`;
}),
}}
/>
@@ -64,7 +64,7 @@ export function WipeTransition({
startingCorner,
angle,
);
return `polygon(${coordinates.map(([x, y]) => `${x}px ${y}px`).join(", ")})`;
return `polygon(${coordinates.map(([x, y]) => `${x}% ${y}%`).join(", ")})`;
}),
}}
ref={childRef}
@@ -305,7 +305,7 @@ export function TimingTowerRow({
3,
3,
);
return `polygon(${coordinates.map(([x, y]) => `${x}px ${y}px`).join(", ")})`;
return `polygon(${coordinates.map(([x, y]) => `${x}% ${y}%`).join(", ")})`;
}),
}}
/>