Fixed settings after reopen a job

main
Boris Sekachev 6 years ago
parent 7303ae2094
commit 4da951a812

@ -227,18 +227,18 @@ export default (state = defaultState, action: AnyAction): SettingsState => {
}, },
}; };
} }
case BoundariesActionTypes.RESET_AFTER_ERROR:
case AnnotationActionTypes.GET_JOB_SUCCESS: { case AnnotationActionTypes.GET_JOB_SUCCESS: {
const { job } = action.payload; const { job } = action.payload;
return { return {
...state, ...defaultState,
player: { player: {
...state.player, ...defaultState.player,
resetZoom: job && job.task.mode === 'annotation', resetZoom: job && job.task.mode === 'annotation',
}, },
}; };
} }
case BoundariesActionTypes.RESET_AFTER_ERROR:
case AuthActionTypes.LOGOUT_SUCCESS: { case AuthActionTypes.LOGOUT_SUCCESS: {
return { ...defaultState }; return { ...defaultState };
} }

Loading…
Cancel
Save