@@ -87,7 +102,12 @@ export default function PlayerSettingsComponent(props: Props): JSX.Element {
Player speed
-
@@ -201,7 +234,14 @@ export default function PlayerSettingsComponent(props: Props): JSX.Element {
Contrast
-
+ {
+ onChangeContrastLevel(value as number);
+ }}
+ />
@@ -209,7 +249,14 @@ export default function PlayerSettingsComponent(props: Props): JSX.Element {
Saturation
-
+ {
+ onChangeSaturationLevel(value as number);
+ }}
+ />
diff --git a/cvat-ui/src/components/settings-page/settings-page.tsx b/cvat-ui/src/components/settings-page/settings-page.tsx
index 9be48c87acb4..1bde5d10dfff 100644
--- a/cvat-ui/src/components/settings-page/settings-page.tsx
+++ b/cvat-ui/src/components/settings-page/settings-page.tsx
@@ -11,7 +11,6 @@ import {
import Text from 'antd/lib/typography/Text';
import { RouteComponentProps } from 'react-router';
-import { withRouter } from 'react-router-dom';
import WorkspaceSettingsContainer from 'containers/settings-page/workspace-settings';
import PlayerSettingsContainer from 'containers/settings-page/player-settings';
@@ -76,4 +75,4 @@ function SettingsPage(props: RouteComponentProps): JSX.Element {
);
}
-export default withRouter(SettingsPage);
+export default SettingsPage;
diff --git a/cvat-ui/src/components/settings-page/workspace-settings.tsx b/cvat-ui/src/components/settings-page/workspace-settings.tsx
index 3fd6d10be6a4..c704f8fa0626 100644
--- a/cvat-ui/src/components/settings-page/workspace-settings.tsx
+++ b/cvat-ui/src/components/settings-page/workspace-settings.tsx
@@ -8,6 +8,7 @@ import {
} from 'antd';
import Text from 'antd/lib/typography/Text';
+import { CheckboxChangeEvent } from 'antd/lib/checkbox';
interface Props {
autoSave: boolean;
@@ -26,6 +27,10 @@ export default function WorkspaceSettingsComponent(props: Props): JSX.Element {
autoSaveInterval,
aamZoomMargin,
showAllInterpolationTracks,
+ onSwitchAutoSave,
+ onChangeAutoSaveInterval,
+ onChangeAAMZoomMargin,
+ onSwitchShowingInterpolatedTracks,
} = props;
return (
@@ -35,6 +40,9 @@ export default function WorkspaceSettingsComponent(props: Props): JSX.Element {
{
+ onSwitchAutoSave(event.target.checked);
+ }}
>
Enable auto save
@@ -48,6 +56,11 @@ export default function WorkspaceSettingsComponent(props: Props): JSX.Element {
max={60}
step={1}
value={Math.round(autoSaveInterval / (60 * 1000))}
+ onChange={(value: number | undefined): void => {
+ if (value) {
+ onChangeAutoSaveInterval(value * 60 * 1000);
+ }
+ }}
/>
minutes
@@ -57,6 +70,9 @@ export default function WorkspaceSettingsComponent(props: Props): JSX.Element {
{
+ onSwitchShowingInterpolatedTracks(event.target.checked);
+ }}
>
Show all interpolation tracks
@@ -68,7 +84,16 @@ export default function WorkspaceSettingsComponent(props: Props): JSX.Element {
Attribute annotation mode (AAM) zoom margin
-
+ {
+ if (value) {
+ onChangeAAMZoomMargin(value);
+ }
+ }}
+ />
diff --git a/cvat-ui/src/components/task-page/job-list.tsx b/cvat-ui/src/components/task-page/job-list.tsx
index fb29cca56d77..3fed1a01b50d 100644
--- a/cvat-ui/src/components/task-page/job-list.tsx
+++ b/cvat-ui/src/components/task-page/job-list.tsx
@@ -1,5 +1,8 @@
import React from 'react';
+import { RouteComponentProps } from 'react-router';
+import { withRouter } from 'react-router-dom';
+
import {
Row,
Col,
@@ -27,19 +30,40 @@ interface Props {
onJobUpdate(jobInstance: any): void;
}
-export default function JobListComponent(props: Props): JSX.Element {
+function JobListComponent(props: Props & RouteComponentProps): JSX.Element {
const {
taskInstance,
registeredUsers,
onJobUpdate,
+ history: {
+ push,
+ },
} = props;
- const { jobs } = taskInstance;
+ const { jobs, id: taskId } = taskInstance;
const columns = [{
title: 'Job',
dataIndex: 'job',
key: 'job',
- render: (id: number): JSX.Element => ({ `Job #${id}` }),
+ render: (id: number): JSX.Element => (
+
+
+ |
+
+
+
+
+ ),
}, {
title: 'Frames',
dataIndex: 'frames',
@@ -168,3 +192,5 @@ export default function JobListComponent(props: Props): JSX.Element {
);
}
+
+export default withRouter(JobListComponent);
diff --git a/cvat-ui/src/containers/annotation-page/annotation-page.tsx b/cvat-ui/src/containers/annotation-page/annotation-page.tsx
index 155a4dc65b27..2ff942be9ee3 100644
--- a/cvat-ui/src/containers/annotation-page/annotation-page.tsx
+++ b/cvat-ui/src/containers/annotation-page/annotation-page.tsx
@@ -24,7 +24,9 @@ interface DispatchToProps {
getJob(): void;
}
-function mapStateToProps(state: CombinedState): StateToProps {
+function mapStateToProps(state: CombinedState, own: OwnProps): StateToProps {
+ const { params } = own.match;
+ const jobID = +params.jid;
const {
annotation: {
job: {
@@ -35,7 +37,7 @@ function mapStateToProps(state: CombinedState): StateToProps {
} = state;
return {
- job,
+ job: !job || jobID === job.id ? job : null,
fetching,
};
}
diff --git a/cvat-ui/src/containers/annotation-page/standard-workspace/canvas-wrapper.tsx b/cvat-ui/src/containers/annotation-page/standard-workspace/canvas-wrapper.tsx
index e30946730f82..ea0dd7c1e306 100644
--- a/cvat-ui/src/containers/annotation-page/standard-workspace/canvas-wrapper.tsx
+++ b/cvat-ui/src/containers/annotation-page/standard-workspace/canvas-wrapper.tsx
@@ -52,6 +52,10 @@ interface StateToProps {
gridOpacity: number;
activeLabelID: number;
activeObjectType: ObjectType;
+ brightnessLevel: number;
+ contrastLevel: number;
+ saturationLevel: number;
+ resetZoom: boolean;
minZLayer: number;
maxZLayer: number;
curZLayer: number;
@@ -116,6 +120,10 @@ function mapStateToProps(state: CombinedState): StateToProps {
gridSize,
gridColor,
gridOpacity,
+ brightnessLevel,
+ contrastLevel,
+ saturationLevel,
+ resetZoom,
},
shapes: {
opacity,
@@ -145,6 +153,10 @@ function mapStateToProps(state: CombinedState): StateToProps {
gridOpacity,
activeLabelID,
activeObjectType,
+ brightnessLevel,
+ contrastLevel,
+ saturationLevel,
+ resetZoom,
curZLayer,
minZLayer,
maxZLayer,
diff --git a/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx b/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx
index 34f582d6dfbe..531d5fb3ce6e 100644
--- a/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx
+++ b/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx
@@ -2,6 +2,9 @@ import React from 'react';
import copy from 'copy-to-clipboard';
import { connect } from 'react-redux';
+import { withRouter } from 'react-router';
+import { RouteComponentProps } from 'react-router-dom';
+
import { SliderValue } from 'antd/lib/slider';
import {
@@ -15,18 +18,22 @@ import {
} from 'actions/annotation-actions';
import AnnotationTopBarComponent from 'components/annotation-page/top-bar/top-bar';
-import { CombinedState } from 'reducers/interfaces';
+import { CombinedState, FrameSpeed } from 'reducers/interfaces';
interface StateToProps {
jobInstance: any;
frameNumber: number;
frameStep: number;
+ frameSpeed: FrameSpeed;
+ frameDelay: number;
playing: boolean;
saving: boolean;
canvasIsReady: boolean;
savingStatuses: string[];
undoAction?: string;
redoAction?: string;
+ autoSave: boolean;
+ autoSaveInterval: number;
}
interface DispatchToProps {
@@ -45,6 +52,7 @@ function mapStateToProps(state: CombinedState): StateToProps {
playing,
frame: {
number: frameNumber,
+ delay: frameDelay,
},
},
annotations: {
@@ -63,13 +71,20 @@ function mapStateToProps(state: CombinedState): StateToProps {
},
settings: {
player: {
+ frameSpeed,
frameStep,
},
+ workspace: {
+ autoSave,
+ autoSaveInterval,
+ },
},
} = state;
return {
frameStep,
+ frameSpeed,
+ frameDelay,
playing,
canvasIsReady,
saving,
@@ -78,6 +93,8 @@ function mapStateToProps(state: CombinedState): StateToProps {
jobInstance,
undoAction: history.undo[history.undo.length - 1],
redoAction: history.redo[history.redo.length - 1],
+ autoSave,
+ autoSaveInterval,
};
}
@@ -105,32 +122,80 @@ function mapDispatchToProps(dispatch: any): DispatchToProps {
};
}
-type Props = StateToProps & DispatchToProps;
+type Props = StateToProps & DispatchToProps & RouteComponentProps;
class AnnotationTopBarContainer extends React.PureComponent {
+ private autoSaveInterval: number | undefined;
+ private unblock: any;
+
+ public componentDidMount(): void {
+ const {
+ autoSave,
+ autoSaveInterval,
+ saving,
+ history,
+ jobInstance,
+ } = this.props;
+
+ this.autoSaveInterval = window.setInterval((): void => {
+ if (autoSave && !saving) {
+ this.onSaveAnnotation();
+ }
+ }, autoSaveInterval);
+
+ this.unblock = history.block((location: any) => {
+ if (jobInstance.annotations.hasUnsavedChanges() && location.pathname !== '/settings'
+ && location.pathname !== `/tasks/${jobInstance.task.id}/jobs/${jobInstance.id}`) {
+ return 'You have unsaved changes, please confirm leaving this page.';
+ }
+ return undefined;
+ });
+ this.beforeUnloadCallback = this.beforeUnloadCallback.bind(this);
+ window.addEventListener('beforeunload', this.beforeUnloadCallback);
+ }
+
public componentDidUpdate(): void {
const {
jobInstance,
+ frameSpeed,
frameNumber,
+ frameDelay,
playing,
canvasIsReady,
- onChangeFrame,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
+
if (playing && canvasIsReady) {
if (frameNumber < jobInstance.stopFrame) {
+ let framesSkiped = 0;
+ if (frameSpeed === FrameSpeed.Fast
+ && (frameNumber + 1 < jobInstance.stopFrame)) {
+ framesSkiped = 1;
+ }
+ if (frameSpeed === FrameSpeed.Fastest
+ && (frameNumber + 2 < jobInstance.stopFrame)) {
+ framesSkiped = 2;
+ }
+
setTimeout(() => {
const { playing: stillPlaying } = this.props;
if (stillPlaying) {
- onChangeFrame(frameNumber + 1);
+ onChangeFrame(frameNumber + 1 + framesSkiped);
}
- });
+ }, frameDelay);
} else {
onSwitchPlay(false);
}
}
}
+ public componentWillUnmount(): void {
+ window.clearInterval(this.autoSaveInterval);
+ window.removeEventListener('beforeunload', this.beforeUnloadCallback);
+ this.unblock();
+ }
+
private undo = (): void => {
const {
undo,
@@ -177,11 +242,11 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onFirstFrame = (): void => {
const {
- onChangeFrame,
frameNumber,
jobInstance,
playing,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
const newFrame = jobInstance.startFrame;
@@ -195,12 +260,12 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onBackward = (): void => {
const {
- onChangeFrame,
frameNumber,
frameStep,
jobInstance,
playing,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
const newFrame = Math
@@ -215,11 +280,11 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onPrevFrame = (): void => {
const {
- onChangeFrame,
frameNumber,
jobInstance,
playing,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
const newFrame = Math
@@ -234,11 +299,11 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onNextFrame = (): void => {
const {
- onChangeFrame,
frameNumber,
jobInstance,
playing,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
const newFrame = Math
@@ -253,12 +318,12 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onForward = (): void => {
const {
- onChangeFrame,
frameNumber,
frameStep,
jobInstance,
playing,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
const newFrame = Math
@@ -273,11 +338,11 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onLastFrame = (): void => {
const {
- onChangeFrame,
frameNumber,
jobInstance,
playing,
onSwitchPlay,
+ onChangeFrame,
} = this.props;
const newFrame = jobInstance.stopFrame;
@@ -314,8 +379,8 @@ class AnnotationTopBarContainer extends React.PureComponent {
private onChangePlayerInputValue = (value: number | undefined): void => {
const {
onSwitchPlay,
- playing,
onChangeFrame,
+ playing,
} = this.props;
if (typeof (value) !== 'undefined') {
@@ -336,6 +401,17 @@ class AnnotationTopBarContainer extends React.PureComponent {
copy(url);
};
+ private beforeUnloadCallback(event: BeforeUnloadEvent): any {
+ const { jobInstance } = this.props;
+ if (jobInstance.annotations.hasUnsavedChanges()) {
+ const confirmationMessage = 'You have unsaved changes, please confirm leaving this page.';
+ // eslint-disable-next-line no-param-reassign
+ event.returnValue = confirmationMessage;
+ return confirmationMessage;
+ }
+ return undefined;
+ }
+
public render(): JSX.Element {
const {
playing,
@@ -379,7 +455,9 @@ class AnnotationTopBarContainer extends React.PureComponent {
}
}
-export default connect(
- mapStateToProps,
- mapDispatchToProps,
-)(AnnotationTopBarContainer);
+export default withRouter(
+ connect(
+ mapStateToProps,
+ mapDispatchToProps,
+ )(AnnotationTopBarContainer),
+);
diff --git a/cvat-ui/src/containers/settings-page/player-settings.tsx b/cvat-ui/src/containers/settings-page/player-settings.tsx
index 73193b8f4278..ee0d56f0166b 100644
--- a/cvat-ui/src/containers/settings-page/player-settings.tsx
+++ b/cvat-ui/src/containers/settings-page/player-settings.tsx
@@ -4,11 +4,17 @@ import { connect } from 'react-redux';
import PlayerSettingsComponent from 'components/settings-page/player-settings';
import {
+ changeFrameStep,
+ changeFrameSpeed,
+ switchResetZoom,
switchRotateAll,
switchGrid,
changeGridSize,
changeGridColor,
changeGridOpacity,
+ changeBrightnessLevel,
+ changeContrastLevel,
+ changeSaturationLevel,
} from 'actions/settings-actions';
import {
@@ -54,20 +60,14 @@ function mapStateToProps(state: CombinedState): StateToProps {
function mapDispatchToProps(dispatch: any): DispatchToProps {
return {
- // will be implemented
- // eslint-disable-next-line
onChangeFrameStep(step: number): void {
-
+ dispatch(changeFrameStep(step));
},
- // will be implemented
- // eslint-disable-next-line
onChangeFrameSpeed(speed: FrameSpeed): void {
-
+ dispatch(changeFrameSpeed(speed));
},
- // will be implemented
- // eslint-disable-next-line
onSwitchResetZoom(enabled: boolean): void {
-
+ dispatch(switchResetZoom(enabled));
},
onSwitchRotateAll(rotateAll: boolean): void {
dispatch(switchRotateAll(rotateAll));
@@ -84,20 +84,14 @@ function mapDispatchToProps(dispatch: any): DispatchToProps {
onChangeGridOpacity(gridOpacity: number): void {
dispatch(changeGridOpacity(gridOpacity));
},
- // will be implemented
- // eslint-disable-next-line
onChangeBrightnessLevel(level: number): void {
-
+ dispatch(changeBrightnessLevel(level));
},
- // will be implemented
- // eslint-disable-next-line
onChangeContrastLevel(level: number): void {
-
+ dispatch(changeContrastLevel(level));
},
- // will be implemented
- // eslint-disable-next-line
onChangeSaturationLevel(level: number): void {
-
+ dispatch(changeSaturationLevel(level));
},
};
}
diff --git a/cvat-ui/src/containers/settings-page/settings-page.tsx b/cvat-ui/src/containers/settings-page/settings-page.tsx
new file mode 100644
index 000000000000..4992c7cdd663
--- /dev/null
+++ b/cvat-ui/src/containers/settings-page/settings-page.tsx
@@ -0,0 +1,79 @@
+import React from 'react';
+import { connect } from 'react-redux';
+
+import { RouteComponentProps } from 'react-router';
+import { withRouter } from 'react-router-dom';
+
+import SettingsPageComponent from 'components/settings-page/settings-page';
+
+
+import {
+ CombinedState,
+} from 'reducers/interfaces';
+
+interface StateToProps {
+ jobInstance: any;
+}
+
+function mapStateToProps(state: CombinedState): StateToProps {
+ const {
+ annotation: {
+ job: {
+ instance: jobInstance,
+ },
+ },
+ } = state;
+ return {
+ jobInstance,
+ };
+}
+
+type Props = StateToProps & RouteComponentProps;
+class SettingsPageContainer extends React.PureComponent {
+ private unblock: any;
+
+ public componentDidMount(): void {
+ const {
+ history,
+ jobInstance,
+ } = this.props;
+
+ this.unblock = history.block((location: any) => {
+ if (jobInstance && jobInstance.annotations.hasUnsavedChanges()
+ && location.pathname !== `/tasks/${jobInstance.task.id}/jobs/${jobInstance.id}`) {
+ return 'You have unsaved changes, please confirm leaving this page.';
+ }
+ return undefined;
+ });
+ this.beforeUnloadCallback = this.beforeUnloadCallback.bind(this);
+ window.addEventListener('beforeunload', this.beforeUnloadCallback);
+ }
+
+ public componentWillUnmount(): void {
+ window.removeEventListener('beforeunload', this.beforeUnloadCallback);
+ this.unblock();
+ }
+
+ private beforeUnloadCallback(event: BeforeUnloadEvent): any {
+ const { jobInstance } = this.props;
+ if (jobInstance.annotations.hasUnsavedChanges()) {
+ const confirmationMessage = 'You have unsaved changes, please confirm leaving this page.';
+ // eslint-disable-next-line no-param-reassign
+ event.returnValue = confirmationMessage;
+ return confirmationMessage;
+ }
+ return undefined;
+ }
+
+ public render(): JSX.Element {
+ return (
+
+ );
+ }
+}
+
+export default withRouter(
+ connect(
+ mapStateToProps,
+ )(SettingsPageContainer),
+);
diff --git a/cvat-ui/src/containers/settings-page/workspace-settings.tsx b/cvat-ui/src/containers/settings-page/workspace-settings.tsx
index 0c5a597efbfe..c1253c469877 100644
--- a/cvat-ui/src/containers/settings-page/workspace-settings.tsx
+++ b/cvat-ui/src/containers/settings-page/workspace-settings.tsx
@@ -1,6 +1,13 @@
import React from 'react';
import { connect } from 'react-redux';
+import {
+ switchAutoSave,
+ changeAutoSaveInterval,
+ changeAAMZoomMargin,
+ switchShowingInterpolatedTracks,
+} from 'actions/settings-actions';
+
import {
CombinedState,
} from 'reducers/interfaces';
@@ -38,27 +45,19 @@ function mapStateToProps(state: CombinedState): StateToProps {
};
}
-function mapDispatchToProps(): DispatchToProps {
+function mapDispatchToProps(dispatch: any): DispatchToProps {
return {
- // will be implemented
- // eslint-disable-next-line
onSwitchAutoSave(enabled: boolean): void {
-
+ dispatch(switchAutoSave(enabled));
},
- // will be implemented
- // eslint-disable-next-line
onChangeAutoSaveInterval(interval: number): void {
-
+ dispatch(changeAutoSaveInterval(interval));
},
- // will be implemented
- // eslint-disable-next-line
onChangeAAMZoomMargin(margin: number): void {
-
+ dispatch(changeAAMZoomMargin(margin));
},
- // will be implemented
- // eslint-disable-next-line
onSwitchShowingInterpolatedTracks(enabled: boolean): void {
-
+ dispatch(switchShowingInterpolatedTracks(enabled));
},
};
}
diff --git a/cvat-ui/src/reducers/annotation-reducer.ts b/cvat-ui/src/reducers/annotation-reducer.ts
index 3950686ad58f..c3d642047258 100644
--- a/cvat-ui/src/reducers/annotation-reducer.ts
+++ b/cvat-ui/src/reducers/annotation-reducer.ts
@@ -36,6 +36,8 @@ const defaultState: AnnotationState = {
number: 0,
data: null,
fetching: false,
+ delay: 0,
+ changeTime: null,
},
playing: false,
},
@@ -151,6 +153,15 @@ export default (state = defaultState, action: AnyAction): AnnotationState => {
},
};
}
+ case AnnotationActionTypes.CLOSE_JOB: {
+ return {
+ ...defaultState,
+ canvas: {
+ ...defaultState.canvas,
+ instance: new Canvas(),
+ },
+ };
+ }
case AnnotationActionTypes.CHANGE_FRAME: {
return {
...state,
@@ -174,6 +185,8 @@ export default (state = defaultState, action: AnyAction): AnnotationState => {
states,
minZ,
maxZ,
+ delay,
+ changeTime,
} = action.payload;
const activatedStateID = states
@@ -188,6 +201,8 @@ export default (state = defaultState, action: AnyAction): AnnotationState => {
data,
number,
fetching: false,
+ changeTime,
+ delay,
},
},
annotations: {
diff --git a/cvat-ui/src/reducers/interfaces.ts b/cvat-ui/src/reducers/interfaces.ts
index 1b48a2dd2a55..ee0b80c8a3e8 100644
--- a/cvat-ui/src/reducers/interfaces.ts
+++ b/cvat-ui/src/reducers/interfaces.ts
@@ -305,6 +305,8 @@ export interface AnnotationState {
number: number;
data: any | null;
fetching: boolean;
+ delay: number;
+ changeTime: number | null;
};
playing: boolean;
};
diff --git a/cvat-ui/src/reducers/settings-reducer.ts b/cvat-ui/src/reducers/settings-reducer.ts
index b35dd37df43d..9879e2b34228 100644
--- a/cvat-ui/src/reducers/settings-reducer.ts
+++ b/cvat-ui/src/reducers/settings-reducer.ts
@@ -30,9 +30,9 @@ const defaultState: SettingsState = {
gridSize: 100,
gridColor: GridColor.White,
gridOpacity: 0,
- brightnessLevel: 50,
- contrastLevel: 50,
- saturationLevel: 50,
+ brightnessLevel: 100,
+ contrastLevel: 100,
+ saturationLevel: 100,
},
};
@@ -119,6 +119,96 @@ export default (state = defaultState, action: AnyAction): SettingsState => {
},
};
}
+ case SettingsActionTypes.CHANGE_FRAME_STEP: {
+ return {
+ ...state,
+ player: {
+ ...state.player,
+ frameStep: action.payload.frameStep,
+ },
+ };
+ }
+ case SettingsActionTypes.CHANGE_FRAME_SPEED: {
+ return {
+ ...state,
+ player: {
+ ...state.player,
+ frameSpeed: action.payload.frameSpeed,
+ },
+ };
+ }
+ case SettingsActionTypes.SWITCH_RESET_ZOOM: {
+ return {
+ ...state,
+ player: {
+ ...state.player,
+ resetZoom: action.payload.resetZoom,
+ },
+ };
+ }
+ case SettingsActionTypes.CHANGE_BRIGHTNESS_LEVEL: {
+ return {
+ ...state,
+ player: {
+ ...state.player,
+ brightnessLevel: action.payload.level,
+ },
+ };
+ }
+ case SettingsActionTypes.CHANGE_CONTRAST_LEVEL: {
+ return {
+ ...state,
+ player: {
+ ...state.player,
+ contrastLevel: action.payload.level,
+ },
+ };
+ }
+ case SettingsActionTypes.CHANGE_SATURATION_LEVEL: {
+ return {
+ ...state,
+ player: {
+ ...state.player,
+ saturationLevel: action.payload.level,
+ },
+ };
+ }
+ case SettingsActionTypes.SWITCH_AUTO_SAVE: {
+ return {
+ ...state,
+ workspace: {
+ ...state.workspace,
+ autoSave: action.payload.autoSave,
+ },
+ };
+ }
+ case SettingsActionTypes.CHANGE_AUTO_SAVE_INTERVAL: {
+ return {
+ ...state,
+ workspace: {
+ ...state.workspace,
+ autoSaveInterval: action.payload.autoSaveInterval,
+ },
+ };
+ }
+ case SettingsActionTypes.CHANGE_AAM_ZOOM_MARGIN: {
+ return {
+ ...state,
+ workspace: {
+ ...state.workspace,
+ aamZoomMargin: action.payload.aamZoomMargin,
+ },
+ };
+ }
+ case SettingsActionTypes.SWITCH_SHOWNIG_INTERPOLATED_TRACKS: {
+ return {
+ ...state,
+ workspace: {
+ ...state.workspace,
+ showAllInterpolationTracks: action.payload.showAllInterpolationTracks,
+ },
+ };
+ }
default: {
return state;
}