Skip to content
Snippets Groups Projects
Unverified Commit f0e2cb68 authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Merge pull request #1907 from ProjectMirador/remove-viewer-state-out-of-window-state

Remove viewer state out of windows reducer
parents fd5794d5 ded05d8f
No related branches found
No related tags found
No related merge requests found
......@@ -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',
},
});
});
});
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment