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

Fix elastic window resize handling

parent 65490b02
No related branches found
No related tags found
No related merge requests found
...@@ -88,8 +88,8 @@ describe('WorkspaceElasticWindow', () => { ...@@ -88,8 +88,8 @@ describe('WorkspaceElasticWindow', () => {
.props() .props()
.onResize('myevent', 'direction', { .onResize('myevent', 'direction', {
style: { style: {
height: 200, height: '200px',
width: 400, width: '400px',
}, },
}, {}, { x: 0, y: 0 }); }, {}, { x: 0, y: 0 });
expect(mockOnResize).toHaveBeenCalledWith('1', { expect(mockOnResize).toHaveBeenCalledWith('1', {
......
...@@ -42,8 +42,8 @@ class WorkspaceElasticWindow extends React.Component { ...@@ -42,8 +42,8 @@ class WorkspaceElasticWindow extends React.Component {
}} }}
onResize={(e, direction, ref, delta, position) => { onResize={(e, direction, ref, delta, position) => {
updateElasticWindowLayout(layout.windowId, { updateElasticWindowLayout(layout.windowId, {
height: ref.style.height - companionWindowDimensions.height, height: Number.parseInt(ref.style.height, 10) - companionWindowDimensions.height,
width: ref.style.width - companionWindowDimensions.width, width: Number.parseInt(ref.style.width, 10) - companionWindowDimensions.width,
x: position.x - offsetX, x: position.x - offsetX,
y: position.y - offsetY, y: position.y - offsetY,
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment