ISSUE-032 - Have Chyron prototyping controls configured and hooked up.
Support for double driver chyrons. Serious refactoring of the BroadcastGraphics states. Simplification and improvements to how the chyron states work (I was using interfaces in a way that was incompatible with reality and have fixed it).
This commit is contained in:
1 parent
d5b653da9d
commit
0625361a18
16 files changed
+233
-124
No files matched your search
@@ -1,23 +1,26 @@
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
import { workspaceSelector } from "../../../features/workspace/workspaceSelector";
|
||||
import { FlagMode } from "../../../types/state";
|
||||
|
||||
import { AngledFlag } from "../../BroadcastGraphics/Common/AngledFlag";
|
||||
import { BasicBlock } from "./styles";
|
||||
|
||||
|
||||
export function AngledFlagWorkSpace() {
|
||||
type AngledFlagWorkSpaceProps = {
|
||||
flagMode: FlagMode,
|
||||
};
|
||||
export function AngledFlagWorkSpace({ flagMode }: AngledFlagWorkSpaceProps) {
|
||||
const { prototypeState } = useSelector(workspaceSelector);
|
||||
|
||||
return (
|
||||
<BasicBlock width={750} height={450} color="rgba(30, 30, 30, .7)">
|
||||
<AngledFlag
|
||||
flagMode="country"
|
||||
flagMode={flagMode}
|
||||
flag={prototypeState?.angledFlag?.flagA ?? "GBR"}
|
||||
flagHeight={64}
|
||||
/>
|
||||
<AngledFlag
|
||||
flagMode="country"
|
||||
flagMode={flagMode}
|
||||
flag={prototypeState?.angledFlag?.flagB ?? "GBR"}
|
||||
flagHeight={128}
|
||||
/>
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ export function AngledFlagPrototypeControls() {
|
||||
};
|
||||
return (
|
||||
<Split as={PadBox} gutter="md" padding="md">
|
||||
<SlotSelector items={countries} onChange={onChange("flagA")}/>
|
||||
<SlotSelector items={countries} onChange={onChange("flagB")}/>
|
||||
<SlotSelector label="64px" items={countries} onChange={onChange("flagA")}/>
|
||||
<SlotSelector label="128px" items={countries} onChange={onChange("flagB")}/>
|
||||
</Split>
|
||||
);
|
||||
}
|
||||
@@ -13,9 +13,7 @@ export type PreviewWindowProps = {
|
||||
dimensions: Dimensions,
|
||||
animatedBG?: boolean,
|
||||
};
|
||||
export const PreviewWindow = styled(PadBox).attrs(() => ({
|
||||
padding: "lg",
|
||||
}))<PreviewWindowProps>`
|
||||
export const PreviewWindow = styled.div<PreviewWindowProps>`
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -11,10 +11,10 @@ import { WorkspaceList } from "./WorkspaceList";
|
||||
import { LayoutGrid, LayoutGridItem } from "../Common/LayoutGrid.styled";
|
||||
|
||||
import { Workspace } from "./Workspace";
|
||||
import { ChyronDriver } from "../BroadcastGraphics/Chyrons/Driver";
|
||||
import { ChyronPrototypeControls } from "./PrototypingControls/ChyronPrototype";
|
||||
import { AngledFlagWorkSpace } from "./CustomWorkSpaces/AngledFlagWorkSpace";
|
||||
import { AngledFlagPrototypeControls } from "./PrototypingControls/AngledFlagPrototype";
|
||||
import { ChyronContainer } from "../BroadcastGraphics/Chyrons/Container";
|
||||
|
||||
const WORKSPACE_LIST_WIDTH = 180;
|
||||
|
||||
@@ -49,17 +49,24 @@ export default function Workspaces() {
|
||||
>
|
||||
<Routes>
|
||||
<Route index element={<h1>Workspaces Home</h1>} />
|
||||
<Route path="chyronDriver" element={
|
||||
<Route path="chyron" element={
|
||||
<Workspace
|
||||
workspaceId="chyronDriver"
|
||||
previewContent={<ChyronDriver />}
|
||||
workspaceId="chyron"
|
||||
previewContent={<ChyronContainer />}
|
||||
prototypeControls={<ChyronPrototypeControls />}
|
||||
/>
|
||||
} />
|
||||
<Route path="angledFlag" element={
|
||||
<Route path="chyronWide" element={
|
||||
<Workspace
|
||||
workspaceId="angledFlag"
|
||||
previewContent={<AngledFlagWorkSpace />}
|
||||
workspaceId="chyronWide"
|
||||
previewContent={<ChyronContainer />}
|
||||
prototypeControls={<ChyronPrototypeControls />}
|
||||
/>
|
||||
} />
|
||||
<Route path="angledFlagCountry" element={
|
||||
<Workspace
|
||||
workspaceId="angledFlagCountry"
|
||||
previewContent={<AngledFlagWorkSpace flagMode="country"/>}
|
||||
prototypeControls={<AngledFlagPrototypeControls />}
|
||||
/>
|
||||
} />
|
||||
|
||||
Reference in new issue
Block a user