ISSUE-017 - Improvements to a number of things.
* Moved FullScreenContainer in WorkspacesRoute to make scrolling much better. Seriously, 100% works better. * Simplified dimensions state actions to a shared one. * Abandoned the noisy and useless "AnimatedBG" type. * Added workspace dimensions state (I'll need this later to prevent off-screen dragging). * Placed OverlayDisplay component in PreviewWindow, where it makes more sense. I'll still allow it to roam around outside of it, though. * Renamed "menu" dimensions to "mainMenu". * Improved initNewOverlayItem action to support setting visible. * Correct handling of showing the OverlayItemContainer. * Simplified the initial position of a new OverlayItem to a simple initial value instead of setting it in the middle of provided dimensions. * Made PreviewWindow `position: relative` to allow absolute positioning of OverlayItem from it. * Added importHelpers to tsconfig because VSCode was complaining about it.
This commit is contained in:
1 parent
506491eed9
commit
61b60b9819
16 files changed
+113
-76
No files matched your search
+20
-9
@@ -2,8 +2,7 @@ import { Outlet } from "react-router-dom";
|
|||||||
|
|
||||||
import { useDimensions } from "./utils/hooks";
|
import { useDimensions } from "./utils/hooks";
|
||||||
import {
|
import {
|
||||||
setMenuDimensions,
|
setDimensions,
|
||||||
setAppDimensions,
|
|
||||||
} from "./features/pageDimensions/pageDimensionsSlice";
|
} from "./features/pageDimensions/pageDimensionsSlice";
|
||||||
|
|
||||||
import { MainMenu } from "./components/Menu";
|
import { MainMenu } from "./components/Menu";
|
||||||
@@ -12,18 +11,30 @@ import { useEffect } from "react";
|
|||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [appRef, { height: appHeight, width: appWidth }] = useDimensions<HTMLDivElement>();
|
const [appRef, {
|
||||||
const [mainMenuRef, { height: mainMenuHeight }] = useDimensions<HTMLDivElement>();
|
height: appHeight,
|
||||||
|
width: appWidth,
|
||||||
|
}] = useDimensions<HTMLDivElement>();
|
||||||
|
const [mainMenuRef, {
|
||||||
|
height: mainMenuHeight,
|
||||||
|
width: mainMenuWidth,
|
||||||
|
}] = useDimensions<HTMLDivElement>();
|
||||||
|
|
||||||
// Set App height and width.
|
// Set App dimensions.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(setAppDimensions({ height: appHeight, width: appWidth }));
|
dispatch(setDimensions({
|
||||||
|
name: "app",
|
||||||
|
dimensions: { height: appHeight, width: appWidth },
|
||||||
|
}));
|
||||||
}, [appHeight, appWidth]);
|
}, [appHeight, appWidth]);
|
||||||
|
|
||||||
// Set MainMenu height.
|
// Set MainMenu dimensions.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(setMenuDimensions({ height: mainMenuHeight }));
|
dispatch(setDimensions({
|
||||||
}, [mainMenuHeight]);
|
name: "mainMenu",
|
||||||
|
dimensions: { height: mainMenuHeight, width: mainMenuWidth },
|
||||||
|
}));
|
||||||
|
}, [mainMenuHeight, mainMenuWidth]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="App" ref={appRef}>
|
<div className="App" ref={appRef}>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import { useSelector } from "react-redux";
|
|||||||
|
|
||||||
import { FullScreenContainer } from "../Common/FullScreenContainer.styled";
|
import { FullScreenContainer } from "../Common/FullScreenContainer.styled";
|
||||||
import { Layout } from "./Layout";
|
import { Layout } from "./Layout";
|
||||||
import { menuDimensionsSelector } from "../../features/pageDimensions/pageDimensionsSelector";
|
import { mainMenuDimensionsSelector } from "../../features/pageDimensions/pageDimensionsSelector";
|
||||||
|
|
||||||
export default function Broadcast() {
|
export default function Broadcast() {
|
||||||
const { height } = useSelector(menuDimensionsSelector);
|
const { height } = useSelector(mainMenuDimensionsSelector);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FullScreenContainer minHeight={700} minWidth={900} heightCutoff={height}>
|
<FullScreenContainer minHeight={700} minWidth={900} heightCutoff={height}>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { AnimatedBG } from "../../../../types/state";
|
|
||||||
import {
|
import {
|
||||||
ToggleContainer,
|
ToggleContainer,
|
||||||
ToggleBody,
|
ToggleBody,
|
||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
export type ToggleProps = {
|
export type ToggleProps = {
|
||||||
label: string,
|
label: string,
|
||||||
toggled: boolean,
|
toggled: boolean,
|
||||||
onToggle: (value: AnimatedBG) => void,
|
onToggle: (value: boolean) => void, // eslint-disable-line no-unused-vars
|
||||||
showIndicators?: boolean,
|
showIndicators?: boolean,
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { useState } from "react";
|
|||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useSelector, useDispatch } from "react-redux";
|
||||||
import { PadBox } from "@bedrock-layout/padbox";
|
import { PadBox } from "@bedrock-layout/padbox";
|
||||||
|
|
||||||
import { appDimensionsSelector } from "../../../features/pageDimensions/pageDimensionsSelector";
|
|
||||||
import { overlayToolSelector } from "../../../features/overlayTool/overlayToolSelector";
|
import { overlayToolSelector } from "../../../features/overlayTool/overlayToolSelector";
|
||||||
import {
|
import {
|
||||||
initNewOverlayItem,
|
initNewOverlayItem,
|
||||||
@@ -22,17 +21,15 @@ export function OverlayControl() {
|
|||||||
|
|
||||||
|
|
||||||
/* For prototyping use only */
|
/* For prototyping use only */
|
||||||
const { width: appWidth, height: appHeight } = useSelector(appDimensionsSelector);
|
|
||||||
const [overlayId, setOverlayId] = useState("foo_1.00000");
|
const [overlayId, setOverlayId] = useState("foo_1.00000");
|
||||||
const { width, height } = useSelector(appDimensionsSelector);
|
|
||||||
|
|
||||||
const getRandomArbitrary = (min: number, max: number) =>
|
const getRandomArbitrary = (min: number, max: number) =>
|
||||||
Math.random() * (max - min) + min;
|
Math.random() * (max - min) + min;
|
||||||
|
|
||||||
const posRandomizer = () => {
|
const posRandomizer = () => {
|
||||||
dispatch(setPosition({
|
dispatch(setPosition({
|
||||||
x: Math.floor(getRandomArbitrary(50, width - 50)),
|
x: Math.floor(getRandomArbitrary(-50, 850)),
|
||||||
y: Math.floor(getRandomArbitrary(50, height - 50)),
|
y: Math.floor(getRandomArbitrary(-50, 650)),
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
const idRandomizer = () => {
|
const idRandomizer = () => {
|
||||||
@@ -48,10 +45,12 @@ export function OverlayControl() {
|
|||||||
if (currentOverlayItem == null) {
|
if (currentOverlayItem == null) {
|
||||||
dispatch(initNewOverlayItem({
|
dispatch(initNewOverlayItem({
|
||||||
overlayId,
|
overlayId,
|
||||||
appDimensions: { height: appHeight, width: appWidth },
|
initialPosition: { x: 400, y: 300 },
|
||||||
|
setVisible: true,
|
||||||
}));
|
}));
|
||||||
|
} else {
|
||||||
|
dispatch(setVisibility(value));
|
||||||
}
|
}
|
||||||
dispatch(setVisibility(value));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -4,11 +4,17 @@ import { overlayToolSelector } from "../../../features/overlayTool/overlayToolSe
|
|||||||
import { OverlayItemContainer } from "./styles";
|
import { OverlayItemContainer } from "./styles";
|
||||||
|
|
||||||
export function OverlayDisplay() {
|
export function OverlayDisplay() {
|
||||||
const { currentOverlayItem } = useSelector(overlayToolSelector);
|
const { currentOverlayItem, visible } = useSelector(overlayToolSelector);
|
||||||
|
|
||||||
if (currentOverlayItem == null) return null;
|
if (currentOverlayItem == null) return null;
|
||||||
|
|
||||||
const { id, position } = currentOverlayItem;
|
const { id, position } = currentOverlayItem;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OverlayItemContainer position={position}>
|
<OverlayItemContainer
|
||||||
|
position={position}
|
||||||
|
visible={visible}
|
||||||
|
>
|
||||||
{id}
|
{id}
|
||||||
<br />
|
<br />
|
||||||
({position.x}px {position.y}px)
|
({position.x}px {position.y}px)
|
||||||
|
|||||||
@@ -3,16 +3,21 @@ import { OverlayPosition } from "../../../types/state";
|
|||||||
|
|
||||||
export type OverlayItemContainerProps = {
|
export type OverlayItemContainerProps = {
|
||||||
position: OverlayPosition,
|
position: OverlayPosition,
|
||||||
|
visible: boolean,
|
||||||
};
|
};
|
||||||
export const OverlayItemContainer = styled.div.attrs<OverlayItemContainerProps>(({
|
export const OverlayItemContainer = styled.div.attrs<OverlayItemContainerProps>(({
|
||||||
position: { x, y },
|
position: { x, y },
|
||||||
|
visible,
|
||||||
}) => ({
|
}) => ({
|
||||||
style: {
|
style: {
|
||||||
top: y,
|
top: y,
|
||||||
left: x,
|
left: x,
|
||||||
|
display: visible ? undefined : "none",
|
||||||
},
|
},
|
||||||
}))<OverlayItemContainerProps>`
|
}))<OverlayItemContainerProps>`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
|
/* Temporary. Overlay will be transparent and based on an image. */
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { workspaceSelector } from "../../../features/workspace/workspaceSelector
|
|||||||
import { PreviewWindow, H2, ControlsContainer } from "./styles";
|
import { PreviewWindow, H2, ControlsContainer } from "./styles";
|
||||||
import { WorkspaceControls } from "./WorkspaceControls";
|
import { WorkspaceControls } from "./WorkspaceControls";
|
||||||
import { MockupBlock } from "../../Common/MockupBlock.styled";
|
import { MockupBlock } from "../../Common/MockupBlock.styled";
|
||||||
|
import { OverlayDisplay } from "../../OverlayTool";
|
||||||
|
|
||||||
import { workspaceObject } from "../workspaces";
|
import { workspaceObject } from "../workspaces";
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ export const Workspace = () => {
|
|||||||
height="300px"
|
height="300px"
|
||||||
width="400px"
|
width="400px"
|
||||||
>Preview Item</MockupBlock>
|
>Preview Item</MockupBlock>
|
||||||
|
<OverlayDisplay />
|
||||||
</PreviewWindow>
|
</PreviewWindow>
|
||||||
<ControlsContainer>
|
<ControlsContainer>
|
||||||
<WorkspaceControls />
|
<WorkspaceControls />
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { useDispatch, useSelector } from "react-redux";
|
|||||||
|
|
||||||
import { workspaceSelector } from "../../../features/workspace/workspaceSelector";
|
import { workspaceSelector } from "../../../features/workspace/workspaceSelector";
|
||||||
import { setAnimatedBG } from "../../../features/workspace/workspaceSlice";
|
import { setAnimatedBG } from "../../../features/workspace/workspaceSlice";
|
||||||
import { AnimatedBG } from "../../../types/state";
|
|
||||||
|
|
||||||
import { Toggle } from "../../Common/Inputs/Toggle";
|
import { Toggle } from "../../Common/Inputs/Toggle";
|
||||||
import { OverlayControl } from "../../OverlayTool";
|
import { OverlayControl } from "../../OverlayTool";
|
||||||
@@ -17,7 +16,7 @@ export const WorkspaceControls = () => {
|
|||||||
<Toggle
|
<Toggle
|
||||||
label="Animate BG"
|
label="Animate BG"
|
||||||
toggled={animatedBG}
|
toggled={animatedBG}
|
||||||
onToggle={(value: AnimatedBG) => {
|
onToggle={(value: boolean) => {
|
||||||
dispatch(setAnimatedBG(value));
|
dispatch(setAnimatedBG(value));
|
||||||
}} />
|
}} />
|
||||||
<OverlayControl />
|
<OverlayControl />
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export type PreviewWindowProps = {
|
|||||||
export const PreviewWindow = styled(PadBox).attrs(() => ({
|
export const PreviewWindow = styled(PadBox).attrs(() => ({
|
||||||
padding: "lg",
|
padding: "lg",
|
||||||
}))<PreviewWindowProps>`
|
}))<PreviewWindowProps>`
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1,27 +1,49 @@
|
|||||||
import { useSelector } from "react-redux";
|
import { useEffect } from "react";
|
||||||
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { Outlet } from "react-router-dom";
|
import { Outlet } from "react-router-dom";
|
||||||
|
|
||||||
import { menuDimensionsSelector } from "../../features/pageDimensions/pageDimensionsSelector";
|
import { mainMenuDimensionsSelector } from "../../features/pageDimensions/pageDimensionsSelector";
|
||||||
|
import { useDimensions } from "../../utils/hooks";
|
||||||
|
import { setDimensions } from "../../features/pageDimensions/pageDimensionsSlice";
|
||||||
|
|
||||||
import { FullScreenContainer } from "../Common/FullScreenContainer.styled";
|
import { FullScreenContainer } from "../Common/FullScreenContainer.styled";
|
||||||
import { WorkspaceList } from "./WorkspaceList";
|
import { WorkspaceList } from "./WorkspaceList";
|
||||||
import { LayoutGrid, LayoutGridItem } from "../Common/LayoutGrid.styled";
|
import { LayoutGrid, LayoutGridItem } from "../Common/LayoutGrid.styled";
|
||||||
import { OverlayDisplay } from "../OverlayTool";
|
|
||||||
|
const WORKSPACE_LIST_WIDTH = 180;
|
||||||
|
|
||||||
export default function Workspaces() {
|
export default function Workspaces() {
|
||||||
const { height } = useSelector(menuDimensionsSelector);
|
const { height } = useSelector(mainMenuDimensionsSelector);
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [workspaceRef, {
|
||||||
|
height: workspaceHeight,
|
||||||
|
width: workspaceWidth,
|
||||||
|
}] = useDimensions<HTMLDivElement>();
|
||||||
|
|
||||||
|
// Set Workspace dimensions.
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch(setDimensions({
|
||||||
|
name: "workspace",
|
||||||
|
dimensions: { height: workspaceHeight, width: workspaceWidth },
|
||||||
|
}));
|
||||||
|
}, [workspaceHeight, workspaceWidth]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FullScreenContainer minHeight={700} minWidth={900} heightCutoff={height}>
|
<LayoutGrid columns={[`${WORKSPACE_LIST_WIDTH}px`, 1]} rows={1}>
|
||||||
<LayoutGrid columns={["180px", 1]} rows={1}>
|
<LayoutGridItem column={1} row={1}>
|
||||||
<LayoutGridItem column={1} row={1}>
|
<WorkspaceList headerOffset={height} />
|
||||||
<WorkspaceList headerOffset={height} />
|
</LayoutGridItem>
|
||||||
</LayoutGridItem>
|
<LayoutGridItem column={2} row={1}>
|
||||||
<LayoutGridItem column={2} row={1}>
|
<FullScreenContainer
|
||||||
|
ref={workspaceRef}
|
||||||
|
minHeight={700}
|
||||||
|
minWidth={900}
|
||||||
|
heightCutoff={height}
|
||||||
|
widthCutoff={WORKSPACE_LIST_WIDTH}
|
||||||
|
>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
<OverlayDisplay />
|
</FullScreenContainer>
|
||||||
</LayoutGridItem>
|
</LayoutGridItem>
|
||||||
</LayoutGrid>
|
</LayoutGrid>
|
||||||
</FullScreenContainer>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,6 @@ import {
|
|||||||
RootState,
|
RootState,
|
||||||
OverlayPosition,
|
OverlayPosition,
|
||||||
OverlayId,
|
OverlayId,
|
||||||
AppDimensions,
|
|
||||||
} from "../../types/state";
|
} from "../../types/state";
|
||||||
|
|
||||||
const initialState: RootState["overlayTool"] = {
|
const initialState: RootState["overlayTool"] = {
|
||||||
@@ -16,13 +15,10 @@ const initialState: RootState["overlayTool"] = {
|
|||||||
|
|
||||||
const makeNewOverlayItem = (
|
const makeNewOverlayItem = (
|
||||||
overlayId: OverlayId,
|
overlayId: OverlayId,
|
||||||
appDimensions: AppDimensions,
|
initialPosition: OverlayPosition,
|
||||||
) => ({
|
) => ({
|
||||||
id: overlayId,
|
id: overlayId,
|
||||||
position: {
|
position: initialPosition,
|
||||||
x: appDimensions.width / 2,
|
|
||||||
y: appDimensions.height / 2,
|
|
||||||
},
|
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
});
|
});
|
||||||
@@ -30,7 +26,8 @@ const makeNewOverlayItem = (
|
|||||||
|
|
||||||
type InitNewOverlayItemAction = {
|
type InitNewOverlayItemAction = {
|
||||||
overlayId: OverlayId,
|
overlayId: OverlayId,
|
||||||
appDimensions: AppDimensions,
|
initialPosition: OverlayPosition,
|
||||||
|
setVisible: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const overlayToolSlice = createSlice({
|
export const overlayToolSlice = createSlice({
|
||||||
@@ -41,9 +38,10 @@ export const overlayToolSlice = createSlice({
|
|||||||
if (state.currentOverlayItem == null) {
|
if (state.currentOverlayItem == null) {
|
||||||
state.currentOverlayItem = makeNewOverlayItem(
|
state.currentOverlayItem = makeNewOverlayItem(
|
||||||
action.payload.overlayId,
|
action.payload.overlayId,
|
||||||
action.payload.appDimensions,
|
action.payload.initialPosition,
|
||||||
);
|
);
|
||||||
state.currentOverlayId = action.payload.overlayId;
|
state.currentOverlayId = action.payload.overlayId;
|
||||||
|
state.visible = action.payload.setVisible;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setVisibility: (state, action: PayloadAction<boolean>) => {
|
setVisibility: (state, action: PayloadAction<boolean>) => {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { RootState } from "../../types/state";
|
import { RootState } from "../../types/state";
|
||||||
|
|
||||||
export const menuDimensionsSelector = (state: RootState) =>
|
export const mainMenuDimensionsSelector = (state: RootState) =>
|
||||||
state.pageDimensions.menu;
|
state.pageDimensions.mainMenu;
|
||||||
export const appDimensionsSelector = (state: RootState) =>
|
export const appDimensionsSelector = (state: RootState) =>
|
||||||
state.pageDimensions.app;
|
state.pageDimensions.app;
|
||||||
|
export const workspaceDimensionsSelector = (state: RootState) =>
|
||||||
|
state.pageDimensions.workspace;
|
||||||
@@ -1,29 +1,27 @@
|
|||||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||||
|
|
||||||
import { RootState, MenuDimensions, AppDimensions } from "../../types/state";
|
import { RootState, Dimensions } from "../../types/state";
|
||||||
|
|
||||||
const initialState: RootState["pageDimensions"] = {
|
const initialState: RootState["pageDimensions"] = {
|
||||||
menu: {
|
mainMenu: { height: 0, width: 0 },
|
||||||
height: 0,
|
app: { height: 0, width: 0 },
|
||||||
},
|
workspace: { height: 0, width: 0 },
|
||||||
app: {
|
};
|
||||||
height: 0,
|
|
||||||
width: 0,
|
type SetDimensionsAction = {
|
||||||
},
|
name: "mainMenu" | "app" | "workspace",
|
||||||
|
dimensions: Dimensions,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const pageDimensionsSlice = createSlice({
|
export const pageDimensionsSlice = createSlice({
|
||||||
name: "pageDimensions",
|
name: "pageDimensions",
|
||||||
initialState,
|
initialState,
|
||||||
reducers: {
|
reducers: {
|
||||||
setMenuDimensions: (state, action: PayloadAction<MenuDimensions>) => {
|
setDimensions: (state, action: PayloadAction<SetDimensionsAction>) => {
|
||||||
state.menu = action.payload;
|
state[action.payload.name] = action.payload.dimensions;
|
||||||
},
|
|
||||||
setAppDimensions: (state, action: PayloadAction<AppDimensions>) => {
|
|
||||||
state.app = action.payload;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const { setMenuDimensions, setAppDimensions } = pageDimensionsSlice.actions;
|
export const { setDimensions } = pageDimensionsSlice.actions;
|
||||||
export default pageDimensionsSlice.reducer;
|
export default pageDimensionsSlice.reducer;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||||
import { RootState, WorkspaceId, AnimatedBG } from "../../types/state";
|
import { RootState, WorkspaceId } from "../../types/state";
|
||||||
|
|
||||||
const initialState: RootState["workspace"] = {
|
const initialState: RootState["workspace"] = {
|
||||||
workspaceId: "",
|
workspaceId: "",
|
||||||
@@ -13,7 +13,7 @@ export const workspaceSlice = createSlice({
|
|||||||
setWorkspaceId: (state, action: PayloadAction<WorkspaceId>) => {
|
setWorkspaceId: (state, action: PayloadAction<WorkspaceId>) => {
|
||||||
state.workspaceId = action.payload;
|
state.workspaceId = action.payload;
|
||||||
},
|
},
|
||||||
setAnimatedBG: (state, action: PayloadAction<AnimatedBG>) => {
|
setAnimatedBG: (state, action: PayloadAction<boolean>) => {
|
||||||
state.animatedBG = action.payload;
|
state.animatedBG = action.payload;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+5
-12
@@ -6,26 +6,19 @@ export type RootState = {
|
|||||||
|
|
||||||
// Page Dimensions
|
// Page Dimensions
|
||||||
export type PageDimensions = {
|
export type PageDimensions = {
|
||||||
menu: MenuDimensions,
|
mainMenu: Dimensions,
|
||||||
app: AppDimensions,
|
app: Dimensions,
|
||||||
};
|
workspace: Dimensions,
|
||||||
|
|
||||||
export type MenuDimensions = {
|
|
||||||
height: number,
|
|
||||||
};
|
|
||||||
export type AppDimensions = {
|
|
||||||
height: number,
|
|
||||||
width: number,
|
|
||||||
};
|
};
|
||||||
|
export type Dimensions = { width: number, height: number };
|
||||||
|
|
||||||
// Workspace
|
// Workspace
|
||||||
export type Workspace = {
|
export type Workspace = {
|
||||||
workspaceId: WorkspaceId,
|
workspaceId: WorkspaceId,
|
||||||
animatedBG: AnimatedBG,
|
animatedBG: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type WorkspaceId = string;
|
export type WorkspaceId = string;
|
||||||
export type AnimatedBG = boolean;
|
|
||||||
|
|
||||||
// Overlay Tool
|
// Overlay Tool
|
||||||
export type OverlayTool = {
|
export type OverlayTool = {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"importHelpers": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
|
|||||||
Reference in new issue
Block a user