Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React UI: Batch of fixes #1211

Merged
merged 12 commits into from
Feb 28, 2020
Prev Previous commit
Next Next commit
Reset zoom for tasks with images
  • Loading branch information
bsekachev committed Feb 28, 2020
commit ed59bd5cd45970359affc48e45b7dd883a70f740
12 changes: 12 additions & 0 deletions cvat-ui/src/reducers/settings-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import { AnyAction } from 'redux';
import { SettingsActionTypes } from 'actions/settings-actions';
import { AnnotationActionTypes } from 'actions/annotation-actions';

import {
SettingsState,
Expand Down Expand Up @@ -213,6 +214,17 @@ export default (state = defaultState, action: AnyAction): SettingsState => {
},
};
}
case AnnotationActionTypes.GET_JOB_SUCCESS: {
const { job } = action.payload;

return {
...state,
player: {
...state.player,
resetZoom: job && job.task.mode === 'annotation',
},
};
}
default: {
return state;
}
Expand Down