diff --git a/__tests__/src/reducers/windows.test.js b/__tests__/src/reducers/windows.test.js index a9a7921facd91d0c168ad2530d7c2a554484eba7..758cb5d9287014286e354b7c4b023c1925419513 100644 --- a/__tests__/src/reducers/windows.test.js +++ b/__tests__/src/reducers/windows.test.js @@ -230,27 +230,4 @@ describe('windows reducer', () => { }, }); }); - - it('should handle UPDATE_VIEWPORT', () => { - expect(windowsReducer({ - abc123: { - id: 'abc123', - }, - def456: { - id: 'def456', - }, - }, { - type: ActionTypes.UPDATE_VIEWPORT, - windowId: 'abc123', - payload: { x: 0, y: 1, zoom: 0.5 }, - })).toEqual({ - abc123: { - id: 'abc123', - viewer: { x: 0, y: 1, zoom: 0.5 }, - }, - def456: { - id: 'def456', - }, - }); - }); }); diff --git a/src/state/reducers/windows.js b/src/state/reducers/windows.js index 3c8421e16c6aad95c781d17a5dffd97f5dff6795..2f3bb2a3e7898070a27e23dbdd5a2829c30d9ed8 100644 --- a/src/state/reducers/windows.js +++ b/src/state/reducers/windows.js @@ -67,14 +67,6 @@ export const windowsReducer = (state = {}, action) => { return setCanvasIndex(state, action.windowId, currentIndex => currentIndex - 1); case ActionTypes.SET_CANVAS: return setCanvasIndex(state, action.windowId, currentIndex => action.canvasIndex); - case ActionTypes.UPDATE_VIEWPORT: - return { - ...state, - [action.windowId]: { - ...state[action.windowId], - viewer: action.payload, - }, - }; default: return state; }