diff --git a/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx b/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx
index 5c5235e..2bb577b 100644
--- a/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx
+++ b/src/components/Broadcast/BroadcastDirectorUI/Chyrons/ChyronsDirectorControls.tsx
@@ -71,7 +71,7 @@ export function ChyronsDirectorControls() {
}
const newChyrons: BGChyrons = {
openState: 0,
- relativePos: { top: "0", right: "0", bottom: "0", left: "0" },
+ placement: { top: "0", right: "0", bottom: "0", left: "0" },
mode: chyronMode,
subMode: chyronSubMode,
driver: {
diff --git a/src/components/Broadcast/Layout/Layout.tsx b/src/components/Broadcast/Layout/Layout.tsx
index 1e1f818..13c0a07 100644
--- a/src/components/Broadcast/Layout/Layout.tsx
+++ b/src/components/Broadcast/Layout/Layout.tsx
@@ -1,6 +1,7 @@
import { MockupBlock } from "../../Common/MockupBlock.styled";
import VideoFeed from "../VideoFeed/VideoFeed";
import { LayoutGrid, LayoutGridItem } from "../../Common/LayoutGrid.styled";
+import { TimingTowerPrototypeControls } from "../../Workspaces/PrototypingControls/TimingTowerPrototype";
type LayoutProps = {
headerHeight?: number,
@@ -33,9 +34,7 @@ export function Layout({ headerHeight }: LayoutProps) {
- Broadcast Director UI
+
);
diff --git a/src/components/Broadcast/VideoFeed/VideoFeed.tsx b/src/components/Broadcast/VideoFeed/VideoFeed.tsx
index e9d5908..ee79789 100644
--- a/src/components/Broadcast/VideoFeed/VideoFeed.tsx
+++ b/src/components/Broadcast/VideoFeed/VideoFeed.tsx
@@ -4,7 +4,7 @@ import { calculateFitSize, calculateScale } from "../../../utils/styling";
import { theme } from "../../../shared/theme";
import { VideoFeedFrame, BackgroundImageDiv, DimensionsSpan, BroadcastLayout } from "./styles";
-import { MockupBlock } from "../../Common/MockupBlock.styled";
+import { TimingBoard } from "../../BroadcastGraphics/TimingBoard";
import bg from "../../../public/images/misc/bg-standin.jpg";
@@ -31,11 +31,7 @@ export default function VideoFeed() {
-
+
);
diff --git a/src/components/BroadcastGraphics/TimingBoard/TimingBoard.tsx b/src/components/BroadcastGraphics/TimingBoard/TimingBoard.tsx
index 0164ed7..1cd86ac 100644
--- a/src/components/BroadcastGraphics/TimingBoard/TimingBoard.tsx
+++ b/src/components/BroadcastGraphics/TimingBoard/TimingBoard.tsx
@@ -5,14 +5,17 @@ import { workspaceSelector } from "../../../features/workspace/workspaceSelector
import { TimingBoardLayout } from "./styles";
import { TimingTower } from "./TimingTower";
import { StatusIndicator } from "./StatusIndicator";
+import { broadcastGraphicsSelector } from "../../../features/broadcast/graphics/broadcastGraphicsSelector";
type TimingBoardProps = {
debug?: boolean,
};
export function TimingBoard({ debug = false }: TimingBoardProps) {
const { debugDurationMultiplier } = useSelector(workspaceSelector);
+ const { timingBoard } = useSelector(broadcastGraphicsSelector);
+
return (
-
+
diff --git a/src/components/BroadcastGraphics/TimingBoard/styles.ts b/src/components/BroadcastGraphics/TimingBoard/styles.ts
index 347222d..a5802ed 100644
--- a/src/components/BroadcastGraphics/TimingBoard/styles.ts
+++ b/src/components/BroadcastGraphics/TimingBoard/styles.ts
@@ -1,7 +1,14 @@
import styled from "styled-components/macro";
-export const TimingBoardLayout = styled.div`
+import { Placement } from "../../../types/style";
+import { placementStyleRules } from "../../../utils/styling";
+
+type TimingBoardLayoutProps = {
+ placement: Placement,
+};
+export const TimingBoardLayout = styled.div`
position: relative;
+ ${({ placement }) => placementStyleRules(placement)}
display: flex;
flex-direction: column;
diff --git a/src/domain/data/broadcastGraphics.ts b/src/domain/data/broadcastGraphics.ts
index 05940ce..ed56aa0 100644
--- a/src/domain/data/broadcastGraphics.ts
+++ b/src/domain/data/broadcastGraphics.ts
@@ -1,17 +1,19 @@
import { keys } from "lodash";
-import { BGChyronSubMode, BGChyronMode, BGRelativePos, FlagMode } from "../../types/state";
+
+import { BGChyronSubMode, BGChyronMode, FlagMode } from "../../types/state";
+import { Placement } from "../../types/style";
// Chyrons Section
const chyronsData: {
[mode: BGChyronMode]: {
- relativePos: BGRelativePos,
+ placement: Placement,
subModes: {
[subMode: BGChyronSubMode]: Record,
},
},
} = {
driver: {
- relativePos: { top: "0", right: "0", bottom: "0", left: "0" },
+ placement: { top: "0", right: "0", bottom: "0", left: "0" },
subModes: {
medium: { width: 582, height: 72 },
large: { width: 638, height: 98 },
@@ -25,8 +27,8 @@ export function getChyronModesList(): Array {
return keys(chyronsData);
}
-export function getChyronRelativePos(mode: BGChyronMode): BGRelativePos {
- return chyronsData[mode]?.relativePos
+export function getChyronRelativePos(mode: BGChyronMode): Placement {
+ return chyronsData[mode]?.placement
?? { top: "0", right: "0", bottom: "0", left: "0" };
}
diff --git a/src/features/broadcast/graphics/broadcastGraphicsSlice.ts b/src/features/broadcast/graphics/broadcastGraphicsSlice.ts
index ffcbc5f..5e41089 100644
--- a/src/features/broadcast/graphics/broadcastGraphicsSlice.ts
+++ b/src/features/broadcast/graphics/broadcastGraphicsSlice.ts
@@ -13,8 +13,8 @@ import {
const initialState: RootState["broadcastGraphics"] = {
chyrons: null,
timingBoard: {
- relativePos: {},
- openState: 0,
+ placement: { top: "54px", left: "96px" },
+ openState: 1,
statusIndicator: {
mode: BGStatusIndicatorModes.LapNarrow,
},
diff --git a/src/types/state.ts b/src/types/state.ts
index ad83a28..a91b509 100644
--- a/src/types/state.ts
+++ b/src/types/state.ts
@@ -1,5 +1,5 @@
import { Meters, Milliseconds, Optional } from "./util";
-import { Corner, Fraction } from "./style";
+import { Corner, Fraction, Placement } from "./style";
export interface RootState {
pageDimensions: PageDimensions;
@@ -253,14 +253,8 @@ export interface BroadcastDirector {
}
// Broadcast Graphics
-export interface BGRelativePos {
- top?: string;
- right?: string;
- bottom?: string;
- left?: string;
-}
export interface BGBaseState {
- relativePos: BGRelativePos;
+ placement: Placement;
openState: OpenState;
}
/**