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

@@ -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(", ")})`;
}),
}}
/>