Skip to content
Snippets Groups Projects
Commit 2f1db398 authored by Chris Beer's avatar Chris Beer
Browse files

Move width + height onto the workspace instead of the viewport

parent 9259650f
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,11 @@ function createWrapper(props) {
windows={{}}
workspace={{
focusedWindowId: 2,
width: 5000,
height: 5000,
viewportPosition: {
x: 20,
y: 20,
width: 5000,
height: 5000,
},
}}
setWorkspaceViewportPosition={() => {}}
......
......@@ -22,15 +22,15 @@ class WorkspaceElastic extends React.Component {
} = this.props;
const { viewportPosition } = workspace;
const offsetX = viewportPosition.width / 2;
const offsetY = viewportPosition.height / 2;
const offsetX = workspace.width / 2;
const offsetY = workspace.height / 2;
return (
<div style={{ position: 'relative', width: '100%', height: '100%' }}>
<Rnd
default={{
width: viewportPosition.width,
height: viewportPosition.height,
width: workspace.width,
height: workspace.height,
}}
position={{
x: viewportPosition.x - offsetX, y: viewportPosition.y - offsetY,
......
......@@ -8,9 +8,9 @@ export const workspaceReducer = (
viewportPosition: {
x: 0,
y: 0,
},
width: 5000,
height: 5000,
},
exposeModeOn: false,
},
action,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment