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

Flip the signs on the workspace positions

parent 2f1db398
No related branches found
No related tags found
No related merge requests found
......@@ -139,8 +139,8 @@ describe('WorkspaceElastic', () => {
y: 200,
});
expect(mockDragStop).toHaveBeenCalledWith({
x: 2700,
y: 2700,
x: -2700,
y: -2700,
});
});
});
......
......@@ -33,7 +33,7 @@ class WorkspaceElastic extends React.Component {
height: workspace.height,
}}
position={{
x: viewportPosition.x - offsetX, y: viewportPosition.y - offsetY,
x: -1 * viewportPosition.x - offsetX, y: -1 * viewportPosition.y - offsetY,
}}
enableResizing={{
top: false,
......@@ -46,7 +46,7 @@ class WorkspaceElastic extends React.Component {
topLeft: false,
}}
onDragStop={(e, d) => {
setWorkspaceViewportPosition({ x: d.x + offsetX, y: d.y + offsetY });
setWorkspaceViewportPosition({ x: -1 * d.x - offsetX, y: -1 * d.y - offsetY });
}}
cancel={`.${ns('window')}`}
className={ns('workspace')}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment