diff --git a/cvat-core/src/annotation-formats.js b/cvat-core/src/annotation-formats.js index 638e246d36b2..0bad3b7fb8a2 100644 --- a/cvat-core/src/annotation-formats.js +++ b/cvat-core/src/annotation-formats.js @@ -15,7 +15,7 @@ format: initialData.ext, version: initialData.version, enabled: initialData.enabled, - dimension: initialData.dimension + dimension: initialData.dimension, }; Object.defineProperties(this, { @@ -63,7 +63,7 @@ /** * @name dimension * @type {string} - * @memberof module:API.cvat.classes.Loader + * @memberof module:API.cvat.enums.DimensionType * @readonly * @instance */ @@ -85,7 +85,7 @@ format: initialData.ext, version: initialData.version, enabled: initialData.enabled, - dimension: initialData.dimension + dimension: initialData.dimension, }; Object.defineProperties(this, { @@ -133,7 +133,7 @@ /** * @name dimension * @type {string} - * @memberof module:API.cvat.classes.Loader + * @memberof module:API.cvat.enums.DimensionType * @readonly * @instance */ diff --git a/cvat-core/src/enums.js b/cvat-core/src/enums.js index 6e2e415a064f..4ce6d80c08c6 100644 --- a/cvat-core/src/enums.js +++ b/cvat-core/src/enums.js @@ -36,7 +36,7 @@ /** * Task dimension * @enum - * @name TaskDimension + * @name DimensionType * @memberof module:API.cvat.enums * @property {string} DIMENSION_2D '2d' * @property {string} DIMENSION_3D '3d' diff --git a/cvat-core/src/session.js b/cvat-core/src/session.js index 7ac48855ff01..5b6aa41fc466 100644 --- a/cvat-core/src/session.js +++ b/cvat-core/src/session.js @@ -974,7 +974,7 @@ use_zip_chunks: undefined, use_cache: undefined, copy_data: undefined, - dimension: undefined + dimension: undefined, }; let updatedFields = { @@ -1454,15 +1454,15 @@ }, }, dimension: { - /** - * @name enabled - * @type {string} - * @memberof module:API.cvat.classes.Loader - * @readonly - * @instance - */ - get: () => data.dimension, - }, + /** + * @name enabled + * @type {string} + * @memberof module:API.cvat.enums.DimensionType + * @readonly + * @instance + */ + get: () => data.dimension, + }, }), ); diff --git a/cvat-ui/src/components/actions-menu/actions-menu.tsx b/cvat-ui/src/components/actions-menu/actions-menu.tsx index bef8550a515c..644f29454793 100644 --- a/cvat-ui/src/components/actions-menu/actions-menu.tsx +++ b/cvat-ui/src/components/actions-menu/actions-menu.tsx @@ -11,7 +11,7 @@ import { MenuInfo } from 'rc-menu/lib/interface'; import DumpSubmenu from './dump-submenu'; import LoadSubmenu from './load-submenu'; import ExportSubmenu from './export-submenu'; -import {DimensionType} from "../../reducers/interfaces"; +import { DimensionType } from '../../reducers/interfaces'; interface Props { taskID: number; @@ -23,7 +23,7 @@ interface Props { dumpActivities: string[] | null; exportActivities: string[] | null; inferenceIsActive: boolean; - taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D; + taskDimension: DimensionType; onClickMenu: (params: MenuInfo, file?: File) => void; } diff --git a/cvat-ui/src/components/actions-menu/dump-submenu.tsx b/cvat-ui/src/components/actions-menu/dump-submenu.tsx index 0fa17ae9ba73..91721ac6bb81 100644 --- a/cvat-ui/src/components/actions-menu/dump-submenu.tsx +++ b/cvat-ui/src/components/actions-menu/dump-submenu.tsx @@ -6,7 +6,7 @@ import React from 'react'; import Menu from 'antd/lib/menu'; import { DownloadOutlined, LoadingOutlined } from '@ant-design/icons'; import Text from 'antd/lib/typography/Text'; -import {DimensionType} from '../../reducers/interfaces' +import { DimensionType } from '../../reducers/interfaces'; function isDefaultFormat(dumperName: string, taskMode: string): boolean { return ( @@ -20,11 +20,13 @@ interface Props { menuKey: string; dumpers: any[]; dumpActivities: string[] | null; - taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D; + taskDimension: DimensionType; } export default function DumpSubmenu(props: Props): JSX.Element { - const { taskMode, menuKey, dumpers, dumpActivities, taskDimension } = props; + const { + taskMode, menuKey, dumpers, dumpActivities, taskDimension, + } = props; return ( diff --git a/cvat-ui/src/components/actions-menu/export-submenu.tsx b/cvat-ui/src/components/actions-menu/export-submenu.tsx index a74199e960ce..683565009155 100644 --- a/cvat-ui/src/components/actions-menu/export-submenu.tsx +++ b/cvat-ui/src/components/actions-menu/export-submenu.tsx @@ -5,18 +5,20 @@ import React from 'react'; import Menu from 'antd/lib/menu'; import Text from 'antd/lib/typography/Text'; -import {DimensionType} from '../../reducers/interfaces' import { ExportOutlined, LoadingOutlined } from '@ant-design/icons'; +import { DimensionType } from '../../reducers/interfaces'; interface Props { menuKey: string; exporters: any[]; exportActivities: string[] | null; - taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D; + taskDimension: DimensionType; } export default function ExportSubmenu(props: Props): JSX.Element { - const { menuKey, exporters, exportActivities, taskDimension } = props; + const { + menuKey, exporters, exportActivities, taskDimension, + } = props; return ( diff --git a/cvat-ui/src/components/actions-menu/load-submenu.tsx b/cvat-ui/src/components/actions-menu/load-submenu.tsx index 2c7edd800c41..476e577fcb36 100644 --- a/cvat-ui/src/components/actions-menu/load-submenu.tsx +++ b/cvat-ui/src/components/actions-menu/load-submenu.tsx @@ -7,19 +7,21 @@ import Menu from 'antd/lib/menu'; import Upload from 'antd/lib/upload'; import Button from 'antd/lib/button'; import Text from 'antd/lib/typography/Text'; -import {DimensionType} from "../../reducers/interfaces"; import { UploadOutlined, LoadingOutlined } from '@ant-design/icons'; +import { DimensionType } from '../../reducers/interfaces'; interface Props { menuKey: string; loaders: any[]; loadActivity: string | null; onFileUpload(file: File): void; - taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D; + taskDimension: DimensionType; } export default function LoadSubmenu(props: Props): JSX.Element { - const { menuKey, loaders, loadActivity, onFileUpload, taskDimension } = props; + const { + menuKey, loaders, loadActivity, onFileUpload, taskDimension, + } = props; return ( diff --git a/cvat-ui/src/components/annotation-page/top-bar/annotation-menu.tsx b/cvat-ui/src/components/annotation-page/top-bar/annotation-menu.tsx index a2ede76e5bd6..9400a20c2809 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/annotation-menu.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/annotation-menu.tsx @@ -161,7 +161,7 @@ export default function AnnotationMenuComponent(props: Props): JSX.Element { dumpers, dumpActivities, menuKey: Actions.DUMP_TASK_ANNO, - taskDimension: jobInstance.task.dimension + taskDimension: jobInstance.task.dimension, })} {LoadSubmenu({ loaders, @@ -170,13 +170,13 @@ export default function AnnotationMenuComponent(props: Props): JSX.Element { onClickMenuWrapper(null, file); }, menuKey: Actions.LOAD_JOB_ANNO, - taskDimension: jobInstance.task.dimension + taskDimension: jobInstance.task.dimension, })} {ExportSubmenu({ exporters: dumpers, exportActivities, menuKey: Actions.EXPORT_TASK_DATASET, - taskDimension:jobInstance.task.dimension + taskDimension: jobInstance.task.dimension, })} Remove annotations diff --git a/cvat-ui/src/components/model-runner-modal/detector-runner.tsx b/cvat-ui/src/components/model-runner-modal/detector-runner.tsx index aad9a93d1cb3..db757867c138 100644 --- a/cvat-ui/src/components/model-runner-modal/detector-runner.tsx +++ b/cvat-ui/src/components/model-runner-modal/detector-runner.tsx @@ -14,7 +14,6 @@ import Text from 'antd/lib/typography/Text'; import InputNumber from 'antd/lib/input-number'; import Button from 'antd/lib/button'; import notification from 'antd/lib/notification'; -import {DimensionType} from '../../reducers/interfaces' // eslint-disable-next-line import/no-extraneous-dependencies import { OptionData, OptionGroupData } from 'rc-select/lib/interface'; @@ -22,6 +21,7 @@ import { Model, StringObject } from 'reducers/interfaces'; import { clamp } from 'utils/math'; import consts from 'consts'; +import { DimensionType } from '../../reducers/interfaces'; interface Props { withCleanup: boolean;