lost-sia 2.0.1-alpha8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/Annotation/logic/Annotation.d.ts +17 -0
- package/dist/Annotation/logic/Annotation.js +1 -0
- package/dist/Annotation/ui/AnnotationComponent.d.ts +24 -0
- package/dist/Annotation/ui/AnnotationComponent.js +1 -0
- package/dist/Annotation/ui/atoms/AnnoBar.d.ts +15 -0
- package/dist/Annotation/ui/atoms/AnnoBar.js +1 -0
- package/dist/Annotation/ui/atoms/DaviIcon.d.ts +9 -0
- package/dist/Annotation/ui/atoms/DaviIcon.js +19 -0
- package/dist/Annotation/ui/atoms/Edge.d.ts +17 -0
- package/dist/Annotation/ui/atoms/Edge.js +1 -0
- package/dist/Annotation/ui/atoms/Node.d.ts +17 -0
- package/dist/Annotation/ui/atoms/Node.js +1 -0
- package/dist/Annotation/ui/atoms/PolygonArea.d.ts +16 -0
- package/dist/Annotation/ui/atoms/PolygonArea.js +1 -0
- package/dist/Annotation/ui/tools/BBox.d.ts +21 -0
- package/dist/Annotation/ui/tools/BBox.js +1 -0
- package/dist/Annotation/ui/tools/Line.d.ts +21 -0
- package/dist/Annotation/ui/tools/Line.js +1 -0
- package/dist/Annotation/ui/tools/Point.d.ts +16 -0
- package/dist/Annotation/ui/tools/Point.js +1 -0
- package/dist/Annotation/ui/tools/Polygon.d.ts +23 -0
- package/dist/Annotation/ui/tools/Polygon.js +1 -0
- package/dist/Canvas/Canvas.d.ts +31 -0
- package/dist/Canvas/Canvas.js +1 -0
- package/dist/Canvas/LabelInput.d.ts +11 -0
- package/dist/Canvas/LabelInput.js +1 -0
- package/dist/IconButton.d.ts +25 -0
- package/dist/IconButton.js +1 -0
- package/dist/Sia.d.ts +33 -0
- package/dist/Sia.js +1 -0
- package/dist/Toolbar/Toolbar.d.ts +21 -0
- package/dist/Toolbar/Toolbar.js +1 -0
- package/dist/Toolbar/ToolbarItems/AccessibilityTools.d.ts +7 -0
- package/dist/Toolbar/ToolbarItems/AccessibilityTools.js +1 -0
- package/dist/Toolbar/ToolbarItems/AnnoToolSelector.d.ts +11 -0
- package/dist/Toolbar/ToolbarItems/AnnoToolSelector.js +1 -0
- package/dist/Toolbar/ToolbarItems/ImageToolItems/ImageLabelInput.d.ts +11 -0
- package/dist/Toolbar/ToolbarItems/ImageToolItems/ImageLabelInput.js +1 -0
- package/dist/Toolbar/ToolbarItems/ImageToolItems/TagLabel.d.ts +11 -0
- package/dist/Toolbar/ToolbarItems/ImageToolItems/TagLabel.js +1 -0
- package/dist/Toolbar/ToolbarItems/ImageTools.d.ts +13 -0
- package/dist/Toolbar/ToolbarItems/ImageTools.js +1 -0
- package/dist/Toolbar/ToolbarItems/Instructions.d.ts +2 -0
- package/dist/Toolbar/ToolbarItems/Instructions.js +1 -0
- package/dist/Toolbar/ToolbarItems/InstructionsModal.d.ts +6 -0
- package/dist/Toolbar/ToolbarItems/InstructionsModal.js +1 -0
- package/dist/assets/SIA-BV1tYu3P.css +1 -0
- package/dist/assets/brand-icons-Cu_C0hZ4.svg +1008 -0
- package/dist/assets/brand-icons-F3SPCeH1.woff +0 -0
- package/dist/assets/brand-icons-XL9sxUpA.woff2 +0 -0
- package/dist/assets/brand-icons-sqJ2Pg7a.eot +0 -0
- package/dist/assets/brand-icons-ubhWoxly.ttf +0 -0
- package/dist/assets/flags-DOLqOU7Y.png +0 -0
- package/dist/assets/icons-BOCtAERH.woff +0 -0
- package/dist/assets/icons-CHzK1VD9.eot +0 -0
- package/dist/assets/icons-D29ZQHHw.ttf +0 -0
- package/dist/assets/icons-Du6TOHnR.woff2 +0 -0
- package/dist/assets/icons-RwhydX30.svg +1518 -0
- package/dist/assets/node_modules/semantic-ui-css/semantic.min-Bvulf91l.css +346 -0
- package/dist/assets/outline-icons-BfdLr8tr.svg +366 -0
- package/dist/assets/outline-icons-DD8jm0uy.ttf +0 -0
- package/dist/assets/outline-icons-DInHoiqI.woff2 +0 -0
- package/dist/assets/outline-icons-LX8adJ4n.eot +0 -0
- package/dist/assets/outline-icons-aQ88nltS.woff +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/models/AnnotationMode.d.ts +11 -0
- package/dist/models/AnnotationMode.js +1 -0
- package/dist/models/AnnotationStatus.d.ts +8 -0
- package/dist/models/AnnotationStatus.js +1 -0
- package/dist/models/AnnotationTool.d.ts +7 -0
- package/dist/models/AnnotationTool.js +1 -0
- package/dist/models/CanvasAction.d.ts +28 -0
- package/dist/models/CanvasAction.js +1 -0
- package/dist/models/Direction.d.ts +7 -0
- package/dist/models/Direction.js +1 -0
- package/dist/models/EditorModes.d.ts +11 -0
- package/dist/models/EditorModes.js +1 -0
- package/dist/models/KeyAction.d.ts +22 -0
- package/dist/models/KeyAction.js +1 -0
- package/dist/models/NotificationType.d.ts +7 -0
- package/dist/models/NotificationType.js +1 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +1 -0
- package/dist/stories/AnnotationTools.stories.d.ts +40 -0
- package/dist/stories/Canvas/Canvas.stories.d.ts +50 -0
- package/dist/stories/Canvas/CanvasOffset.d.ts +13 -0
- package/dist/stories/Canvas/CanvasWithOffset.stories.d.ts +36 -0
- package/dist/stories/FilterDropdown.stories.d.ts +19 -0
- package/dist/stories/MinimalSia.stories.d.ts +66 -0
- package/dist/stories/SIA/DemoWrapper.d.ts +8 -0
- package/dist/stories/SIA/DemoWrapper.stories.d.ts +27 -0
- package/dist/stories/SIA/SIA.stories.d.ts +72 -0
- package/dist/stories/Toolbar/ImageTools/TagLabel.stories.d.ts +21 -0
- package/dist/stories/Toolbar/Instructions.stories.d.ts +11 -0
- package/dist/stories/Toolbar/Toolbar.stories.d.ts +37 -0
- package/dist/stories/exampleData/exampleAnnotations.d.ts +8 -0
- package/dist/stories/exampleData/exampleExternalAnnotations.d.ts +8 -0
- package/dist/stories/exampleData/exampleImage.d.ts +2 -0
- package/dist/stories/exampleData/exampleLabels.d.ts +6 -0
- package/dist/types.d.ts +57 -0
- package/dist/types.js +1 -0
- package/dist/utils/KeyMapper.d.ts +9 -0
- package/dist/utils/KeyMapper.js +1 -0
- package/dist/utils/TimeUtils.d.ts +4 -0
- package/dist/utils/TimeUtils.js +1 -0
- package/dist/utils/color.d.ts +2 -0
- package/dist/utils/color.js +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/mouse.d.ts +6 -0
- package/dist/utils/mouse.js +1 -0
- package/dist/utils/siaIcons.js +12 -0
- package/dist/utils/transform.d.ts +28 -0
- package/dist/utils/transform.js +1 -0
- package/dist/utils/uiConfig.js +1 -0
- package/dist/utils/windowViewport.d.ts +22 -0
- package/dist/utils/windowViewport.js +1 -0
- package/package.json +19 -16
- package/src/AnnoExampleViewer.jsx +18 -18
- package/src/Annotation/logic/Annotation.ts +24 -26
- package/src/Annotation/ui/AnnotationComponent.tsx +115 -86
- package/src/Annotation/ui/atoms/AnnoBar.tsx +51 -53
- package/src/Annotation/ui/atoms/DaviIcon.tsx +12 -22
- package/src/Annotation/ui/atoms/Edge.tsx +25 -22
- package/src/Annotation/ui/atoms/Node.tsx +56 -50
- package/src/Annotation/ui/atoms/PolygonArea.tsx +30 -35
- package/src/Annotation/ui/tools/BBox.tsx +136 -150
- package/src/Annotation/ui/tools/Line.tsx +94 -91
- package/src/Annotation/ui/tools/Point.tsx +19 -17
- package/src/Annotation/ui/tools/Polygon.tsx +126 -95
- package/src/Canvas/Canvas.tsx +748 -594
- package/src/Canvas/LabelInput.tsx +68 -45
- package/src/IconButton.tsx +119 -0
- package/src/InfoBoxes/AnnoDetails.jsx +53 -53
- package/src/InfoBoxes/AnnoStats.jsx +41 -41
- package/src/InfoBoxes/InfoBox.jsx +16 -16
- package/src/InfoBoxes/InfoBoxArea.jsx +32 -34
- package/src/InfoBoxes/LabelInfo.jsx +30 -30
- package/src/SIASettingButton.jsx +25 -25
- package/src/Sia.tsx +484 -0
- package/src/Toolbar/Toolbar.tsx +38 -31
- package/src/Toolbar/ToolbarItems/AccessibilityTools.tsx +26 -46
- package/src/Toolbar/ToolbarItems/AnnoToolSelector.tsx +53 -46
- package/src/Toolbar/ToolbarItems/ImageToolItems/ImageLabelInput.tsx +127 -0
- package/src/Toolbar/ToolbarItems/ImageToolItems/TagLabel.tsx +29 -28
- package/src/Toolbar/ToolbarItems/ImageTools.tsx +43 -40
- package/src/Toolbar/ToolbarItems/Instructions.tsx +47 -50
- package/src/Toolbar/ToolbarItems/InstructionsModal.tsx +8 -8
- package/src/index.ts +9 -13
- package/src/models/{AnnotationMode.tsx → AnnotationMode.ts} +1 -1
- package/src/models/{AnnotationStatus.tsx → AnnotationStatus.ts} +1 -1
- package/src/models/{AnnotationTool.tsx → AnnotationTool.ts} +1 -1
- package/src/models/{CanvasAction.tsx → CanvasAction.ts} +1 -1
- package/src/models/{Direction.tsx → Direction.ts} +1 -1
- package/src/models/{EditorModes.tsx → EditorModes.ts} +1 -1
- package/src/models/{KeyAction.tsx → KeyAction.ts} +3 -1
- package/src/models/NotificationType.ts +8 -0
- package/src/models/index.ts +6 -7
- package/src/siaDummyData.js +71 -71
- package/src/stories/AnnotationTools.mdx +27 -0
- package/src/stories/AnnotationTools.stories.tsx +104 -0
- package/src/stories/Canvas/Canvas.stories.tsx +59 -113
- package/src/stories/Canvas/CanvasOffset.tsx +54 -38
- package/src/stories/Canvas/CanvasWithOffset.stories.tsx +42 -113
- package/src/stories/FilterDropdown.stories.ts +13 -11
- package/src/stories/MinimalSIA.mdx +20 -0
- package/src/stories/MinimalSia.stories.tsx +90 -0
- package/src/stories/SIA/DemoWrapper.stories.tsx +71 -0
- package/src/stories/SIA/DemoWrapper.tsx +55 -0
- package/src/stories/SIA/SIA.stories.tsx +79 -45
- package/src/stories/Toolbar/ImageTools/TagLabel.stories.tsx +11 -12
- package/src/stories/Toolbar/Instructions.stories.tsx +11 -11
- package/src/stories/Toolbar/Toolbar.stories.tsx +32 -47
- package/src/stories/Welcome.mdx +5 -0
- package/src/stories/development/CoordinateSystems.mdx +25 -0
- package/src/stories/exampleData/exampleAnnotations.ts +65 -0
- package/src/stories/exampleData/exampleExternalAnnotations.ts +115 -0
- package/src/stories/{siaDummyData2.ts → exampleData/exampleImage.ts} +3 -264
- package/src/stories/exampleData/exampleLabels.ts +146 -0
- package/src/stories/main.scss +6 -0
- package/src/styles/style.scss +1 -26
- package/src/types.ts +67 -0
- package/src/utils/KeyMapper.ts +76 -74
- package/src/utils/TimeUtils.ts +11 -0
- package/src/utils/color.ts +25 -25
- package/src/utils/hist.js +22 -22
- package/src/utils/index.ts +2 -3
- package/src/utils/mouse.ts +45 -0
- package/src/utils/siaIcons.jsx +5 -7
- package/src/utils/transform.ts +186 -0
- package/src/utils/uiConfig.js +19 -22
- package/src/utils/windowViewport.ts +34 -0
- package/src/AnnoLabelInput.jsx +0 -109
- package/src/AnnoToolBar.jsx +0 -153
- package/src/Annotation/AnnoBar.jsx +0 -154
- package/src/Annotation/Annotation.jsx +0 -395
- package/src/Annotation/Annotation.scss +0 -47
- package/src/Annotation/BBox.jsx +0 -299
- package/src/Annotation/Edge.jsx +0 -92
- package/src/Annotation/InfSelectionArea.jsx +0 -72
- package/src/Annotation/Line.jsx +0 -68
- package/src/Annotation/Node.jsx +0 -282
- package/src/Annotation/Point.jsx +0 -200
- package/src/Annotation/Polygon.jsx +0 -404
- package/src/Annotation/logic/AnnotationUtils.ts +0 -30
- package/src/Canvas.jsx +0 -2194
- package/src/ImgBar.jsx +0 -131
- package/src/LabelInput.jsx +0 -238
- package/src/Prompt.jsx +0 -45
- package/src/SIAFilterButton.jsx +0 -186
- package/src/Sia.jsx +0 -478
- package/src/Sia2.tsx +0 -392
- package/src/SiaPopup.jsx +0 -15
- package/src/ToolBar.jsx +0 -463
- package/src/Toolbar/NavigationButtons.tsx +0 -21
- package/src/Toolbar/ToolbarItem.jsx +0 -30
- package/src/Toolbar/ToolbarItems/ImageToolItems/ImageLabel.tsx +0 -62
- package/src/Toolbar.css +0 -13
- package/src/ToolbarItem.jsx +0 -31
- package/src/filterTools.js +0 -5
- package/src/models/AllowedTools.tsx +0 -9
- package/src/models/AnnotationSettings.tsx +0 -9
- package/src/models/ExternalAnnotation.ts +0 -15
- package/src/models/Label.tsx +0 -8
- package/src/models/UiConfig.tsx +0 -6
- package/src/stories/Button.jsx +0 -54
- package/src/stories/Button.stories.js +0 -48
- package/src/stories/Header.jsx +0 -69
- package/src/stories/Header.stories.js +0 -28
- package/src/stories/Page.jsx +0 -87
- package/src/stories/Page.stories.js +0 -28
- package/src/stories/SIA2/DemoWrapper.stories.tsx +0 -167
- package/src/stories/SIA2/DemoWrapper.tsx +0 -54
- package/src/stories/SIA2/Sia2.stories.tsx +0 -62
- package/src/stories/Toolbar/ImageTools/ImageLabel.stories.tsx +0 -32
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -5
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -15
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -3
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -12
- package/src/stories/assets/youtube.svg +0 -4
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/lost.js +0 -54
- package/src/stories/page.css +0 -69
- package/src/stories/siaDummyData.js +0 -263
- package/src/stories/store.js +0 -18
- package/src/test.js +0 -7
- package/src/types/annoStatus.js +0 -4
- package/src/types/canvasActions.js +0 -58
- package/src/types/cursorstyles.js +0 -3
- package/src/types/modes.js +0 -9
- package/src/types/notificationType.js +0 -11
- package/src/types/toolbarEvents.js +0 -35
- package/src/types/tools.js +0 -17
- package/src/types.tsx +0 -11
- package/src/utils/annoConversion.js +0 -145
- package/src/utils/annoConversion2.ts +0 -145
- package/src/utils/colorlut.js +0 -68
- package/src/utils/constraints.js +0 -81
- package/src/utils/index.js +0 -1
- package/src/utils/keyActions.js +0 -113
- package/src/utils/mouse.js +0 -14
- package/src/utils/mouse2.ts +0 -35
- package/src/utils/transform.js +0 -336
- package/src/utils/transform2.ts +0 -343
- package/src/utils/windowViewport.js +0 -34
- package/src/utils/windowViewport2.ts +0 -50
package/src/ToolBar.jsx
DELETED
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
faPaperPlane,
|
|
3
|
-
faSquare,
|
|
4
|
-
faTrashCan,
|
|
5
|
-
} from "@fortawesome/free-regular-svg-icons";
|
|
6
|
-
import {
|
|
7
|
-
faArrowLeft,
|
|
8
|
-
faArrowRight,
|
|
9
|
-
faBan,
|
|
10
|
-
faCheck,
|
|
11
|
-
faMaximize,
|
|
12
|
-
faMinusCircle,
|
|
13
|
-
faPlusCircle,
|
|
14
|
-
faQuestion,
|
|
15
|
-
faSave,
|
|
16
|
-
faSearch,
|
|
17
|
-
faTag,
|
|
18
|
-
faTrash,
|
|
19
|
-
faVectorSquare,
|
|
20
|
-
} from "@fortawesome/free-solid-svg-icons";
|
|
21
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
22
|
-
import { Button, Card } from "semantic-ui-react";
|
|
23
|
-
import Prompt from "./Prompt";
|
|
24
|
-
import SIAFilterButton from "./SIAFilterButton";
|
|
25
|
-
import SIASettingButton from "./SIASettingButton";
|
|
26
|
-
import "./Toolbar.css";
|
|
27
|
-
|
|
28
|
-
import { CSidebar, CSidebarNav } from "@coreui/react";
|
|
29
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
30
|
-
import ToolbarItem from "./ToolbarItem";
|
|
31
|
-
import * as tbe from "./types/toolbarEvents";
|
|
32
|
-
import * as TOOLS from "./types/tools";
|
|
33
|
-
import * as siaIcons from "./utils/siaIcons";
|
|
34
|
-
|
|
35
|
-
const ToolBar = (props) => {
|
|
36
|
-
const [position, setPosition] = useState({
|
|
37
|
-
left: 0,
|
|
38
|
-
top: 5,
|
|
39
|
-
width: 40,
|
|
40
|
-
});
|
|
41
|
-
const [showFinishPrompt, setShowFinishPrompt] = useState(false);
|
|
42
|
-
const [showHelp, setShowHelp] = useState(false);
|
|
43
|
-
|
|
44
|
-
const toolBarGroup = useRef(null);
|
|
45
|
-
|
|
46
|
-
const toolbarItemStyle = { background: "#1b1c1d" };
|
|
47
|
-
|
|
48
|
-
// if (prevState.fullscreenMode !== this.state.fullscreenMode){
|
|
49
|
-
// this.props.siaSetFullscreen(this.state.fullscreenMode)
|
|
50
|
-
// }
|
|
51
|
-
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
calcPosition();
|
|
54
|
-
}, [props.layoutUpdate, props.svg]);
|
|
55
|
-
|
|
56
|
-
const onClick = (e, tool) => {
|
|
57
|
-
triggerToolBarEvent(tbe.TOOL_SELECTED, tool);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const calcPosition = () => {
|
|
61
|
-
if (!props.enabled) return;
|
|
62
|
-
const tb = toolBarGroup.current.getBoundingClientRect();
|
|
63
|
-
if (tb) {
|
|
64
|
-
if (props.svg) {
|
|
65
|
-
let toolBarTop = props.svg.top + props.svg.height / 6;
|
|
66
|
-
setPosition({
|
|
67
|
-
...position,
|
|
68
|
-
left: props.svg.left - 55,
|
|
69
|
-
top: toolBarTop,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const getNextImg = () => {
|
|
76
|
-
// this.props.siaGetNextImage(this.props.imageMeta.id)
|
|
77
|
-
triggerToolBarEvent(tbe.GET_NEXT_IMAGE);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const getPrevImg = () => {
|
|
81
|
-
// this.props.siaGetPrevImage(this.props.imageMeta.id)
|
|
82
|
-
triggerToolBarEvent(tbe.GET_PREV_IMAGE);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const setFinished = () => {
|
|
86
|
-
// this.props.siaSetTaskFinished()
|
|
87
|
-
triggerToolBarEvent(tbe.TASK_FINISHED);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const toggleFinishPrompt = () => {
|
|
91
|
-
setShowFinishPrompt(!showFinishPrompt);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const toggleFullscreen = () => {
|
|
95
|
-
// this.setState({
|
|
96
|
-
// fullscreenMode: !this.state.fullscreenMode
|
|
97
|
-
// })
|
|
98
|
-
triggerToolBarEvent(tbe.SET_FULLSCREEN);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
const toggleImgLabelInput = () => {
|
|
102
|
-
// this.props.siaShowImgLabelInput(!this.props.imgLabelInput.show)
|
|
103
|
-
triggerToolBarEvent(tbe.SHOW_IMAGE_LABEL_INPUT);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const toggleJunk = () => {
|
|
107
|
-
// this.props.siaImgIsJunk(!this.props.isJunk)
|
|
108
|
-
triggerToolBarEvent(tbe.IMG_IS_JUNK);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const toggleHelp = () => {
|
|
112
|
-
setShowHelp(!showHelp);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
const handleOnDeleteAllAnnos = () => {
|
|
116
|
-
triggerToolBarEvent(tbe.DELETE_ALL_ANNOS);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
const handleSave = () => {
|
|
120
|
-
triggerToolBarEvent(tbe.SAVE);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
const triggerToolBarEvent = (event, data) => {
|
|
124
|
-
if (props.onToolBarEvent) {
|
|
125
|
-
props.onToolBarEvent(event, data);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
const renderToolButtons = () => {
|
|
130
|
-
if (!props.canvasConfig) return null;
|
|
131
|
-
if (!props.enabled.toolSelection) return null;
|
|
132
|
-
if (!props.canvasConfig.annos.actions.draw) return null;
|
|
133
|
-
let btns = [];
|
|
134
|
-
|
|
135
|
-
if (props.canvasConfig.tools.sam) {
|
|
136
|
-
btns.push(
|
|
137
|
-
<ToolbarItem
|
|
138
|
-
color="#0081FB"
|
|
139
|
-
active={props.active.selectedTool === TOOLS.POSITIVE_POINT}
|
|
140
|
-
onClick={(e) => onClick(e, TOOLS.POSITIVE_POINT)}
|
|
141
|
-
faIcon={faPlusCircle}
|
|
142
|
-
/>,
|
|
143
|
-
);
|
|
144
|
-
|
|
145
|
-
btns.push(
|
|
146
|
-
<ToolbarItem
|
|
147
|
-
color="#0081FB"
|
|
148
|
-
active={props.active.selectedTool === TOOLS.NEGATIVE_POINT}
|
|
149
|
-
onClick={(e) => onClick(e, TOOLS.NEGATIVE_POINT)}
|
|
150
|
-
faIcon={faMinusCircle}
|
|
151
|
-
/>,
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
btns.push(
|
|
155
|
-
<ToolbarItem
|
|
156
|
-
color="#0081FB"
|
|
157
|
-
active={props.active.selectedTool === TOOLS.SAM_BBOX}
|
|
158
|
-
onClick={(e) => onClick(e, TOOLS.SAM_BBOX)}
|
|
159
|
-
faIcon={faSquare}
|
|
160
|
-
/>,
|
|
161
|
-
);
|
|
162
|
-
|
|
163
|
-
btns.push(
|
|
164
|
-
<ToolbarItem
|
|
165
|
-
color="#0081FB"
|
|
166
|
-
onClick={(e) => triggerToolBarEvent(tbe.CLEAR_SAM_HELPER_ANNOS)}
|
|
167
|
-
faIcon={faTrashCan}
|
|
168
|
-
/>,
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (props.canvasConfig.tools.point) {
|
|
173
|
-
btns.push(
|
|
174
|
-
<ToolbarItem
|
|
175
|
-
active={props.active.selectedTool === TOOLS.POINT}
|
|
176
|
-
onClick={(e) => onClick(e, TOOLS.POINT)}
|
|
177
|
-
siaIcon={siaIcons.pointIcon()}
|
|
178
|
-
/>,
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
if (props.canvasConfig.tools.line) {
|
|
182
|
-
btns.push(
|
|
183
|
-
<ToolbarItem
|
|
184
|
-
active={props.active.selectedTool === TOOLS.LINE}
|
|
185
|
-
onClick={(e) => onClick(e, TOOLS.LINE)}
|
|
186
|
-
siaIcon={siaIcons.lineIcon()}
|
|
187
|
-
/>,
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
if (props.canvasConfig.tools.bbox) {
|
|
191
|
-
btns.push(
|
|
192
|
-
<ToolbarItem
|
|
193
|
-
active={props.active.selectedTool === TOOLS.BBOX}
|
|
194
|
-
onClick={(e) => onClick(e, TOOLS.BBOX)}
|
|
195
|
-
faIcon={faVectorSquare}
|
|
196
|
-
/>,
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
if (props.canvasConfig.tools.polygon) {
|
|
200
|
-
btns.push(
|
|
201
|
-
<ToolbarItem
|
|
202
|
-
active={props.active.selectedTool === TOOLS.POLYGON}
|
|
203
|
-
onClick={(e) => onClick(e, TOOLS.POLYGON)}
|
|
204
|
-
siaIcon={siaIcons.polygonIcon()}
|
|
205
|
-
/>,
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
return btns;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const renderFinishPrompt = () => {
|
|
212
|
-
return (
|
|
213
|
-
<Prompt
|
|
214
|
-
active={showFinishPrompt}
|
|
215
|
-
header={
|
|
216
|
-
<div>
|
|
217
|
-
<FontAwesomeIcon icon={faPaperPlane} />
|
|
218
|
-
Do you wish to FINISH this SIA Task?
|
|
219
|
-
</div>
|
|
220
|
-
}
|
|
221
|
-
content={
|
|
222
|
-
<div>
|
|
223
|
-
<Button basic color="green" inverted onClick={() => setFinished()}>
|
|
224
|
-
<FontAwesomeIcon icon={faCheck} /> Yes
|
|
225
|
-
</Button>
|
|
226
|
-
<Button
|
|
227
|
-
basic
|
|
228
|
-
color="red"
|
|
229
|
-
inverted
|
|
230
|
-
onClick={() => toggleFinishPrompt()}
|
|
231
|
-
>
|
|
232
|
-
<FontAwesomeIcon icon={faBan} /> No
|
|
233
|
-
</Button>
|
|
234
|
-
</div>
|
|
235
|
-
}
|
|
236
|
-
/>
|
|
237
|
-
);
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* Render next and prev image buttons
|
|
241
|
-
*
|
|
242
|
-
*/
|
|
243
|
-
const renderNavigation = () => {
|
|
244
|
-
let btns = [];
|
|
245
|
-
if (!props.enabled.nextPrev) return null;
|
|
246
|
-
if (props.imageMeta) {
|
|
247
|
-
if (props.imageMeta.isLast) {
|
|
248
|
-
btns.push(
|
|
249
|
-
<>
|
|
250
|
-
<ToolbarItem
|
|
251
|
-
onClick={() => toggleFinishPrompt()}
|
|
252
|
-
faIcon={faPaperPlane}
|
|
253
|
-
/>
|
|
254
|
-
{renderFinishPrompt()}
|
|
255
|
-
</>,
|
|
256
|
-
);
|
|
257
|
-
} else {
|
|
258
|
-
btns.push(
|
|
259
|
-
<ToolbarItem onClick={() => getNextImg()} faIcon={faArrowRight} />,
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
btns.push(
|
|
263
|
-
<ToolbarItem
|
|
264
|
-
disabled={props.imageMeta.isFirst}
|
|
265
|
-
onClick={() => getPrevImg()}
|
|
266
|
-
faIcon={faArrowLeft}
|
|
267
|
-
/>,
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
return btns;
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
const renderJunkButton = () => {
|
|
274
|
-
if (!props.enabled.junk) return null;
|
|
275
|
-
|
|
276
|
-
return (
|
|
277
|
-
<ToolbarItem
|
|
278
|
-
active={props.active.isJunk}
|
|
279
|
-
onClick={() => toggleJunk()}
|
|
280
|
-
faIcon={faBan}
|
|
281
|
-
/>
|
|
282
|
-
);
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
const renderDeleteAllAnnosButton = () => {
|
|
286
|
-
if (!props.enabled.deleteAll) return null;
|
|
287
|
-
return (
|
|
288
|
-
<ToolbarItem onClick={() => handleOnDeleteAllAnnos()} faIcon={faTrash} />
|
|
289
|
-
);
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
const renderSaveButton = () => {
|
|
293
|
-
if (!props.enabled.save) return null;
|
|
294
|
-
return <ToolbarItem onClick={() => handleSave()} faIcon={faSave} />;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
const renderHelpButton = () => {
|
|
298
|
-
if (!props.enabled.help) return null;
|
|
299
|
-
return (
|
|
300
|
-
<>
|
|
301
|
-
<ToolbarItem onClick={() => toggleHelp()} faIcon={faQuestion} />
|
|
302
|
-
<Prompt
|
|
303
|
-
active={showHelp}
|
|
304
|
-
onClick={() => toggleHelp()}
|
|
305
|
-
content={
|
|
306
|
-
<div>
|
|
307
|
-
<Card.Group>
|
|
308
|
-
<Card>
|
|
309
|
-
<Card.Content header="How to draw?" />
|
|
310
|
-
<Card.Content description="1.) Select a Tool in the toolbar 2.) Draw with RIGHT CLICK on Canvas" />
|
|
311
|
-
</Card>
|
|
312
|
-
<Card>
|
|
313
|
-
<Card.Content header="How to delete an annotation?" />
|
|
314
|
-
<Card.Content description="1.) Select an annotation with LEFT CLICK 2.) Press DELETE or BACKSPACE" />
|
|
315
|
-
</Card>
|
|
316
|
-
<Card>
|
|
317
|
-
<Card.Content header="How to assign a label?" />
|
|
318
|
-
<Card.Content description="1.) Select an annotation with LEFT CLICK 2.) Hit ENTER 3.) Type into the input field 4.) Hit ENTER to confirm 5.) Hit ESCAPE to close the input field" />
|
|
319
|
-
</Card>
|
|
320
|
-
<Card>
|
|
321
|
-
<Card.Content header="Undo/ Redo" />
|
|
322
|
-
<Card.Content description="Undo: Hit STRG + Z" />
|
|
323
|
-
<Card.Content description="Redo: Hit STRG + R" />
|
|
324
|
-
</Card>
|
|
325
|
-
<Card>
|
|
326
|
-
<Card.Content header="Add/ Remove a node to Line/Polygon" />
|
|
327
|
-
<Card.Content description="Add: Hit STRG + Click left on the line" />
|
|
328
|
-
<Card.Content description="Remove: Hit STRG + Click left on the node to delete" />
|
|
329
|
-
</Card>
|
|
330
|
-
<Card>
|
|
331
|
-
<Card.Content header="Remove a node from Line/Polygon in create mode" />
|
|
332
|
-
<Card.Content description="Press DELETE or BACKSPACE" />
|
|
333
|
-
</Card>
|
|
334
|
-
<Card>
|
|
335
|
-
<Card.Content header="Edit Line/Polygon" />
|
|
336
|
-
<Card.Content description="1.) Click on the Annotation you want to edit." />
|
|
337
|
-
<Card.Content description='2.) Press "e". New nodes can now be added using right click' />
|
|
338
|
-
</Card>
|
|
339
|
-
<Card>
|
|
340
|
-
<Card.Content header="Zoom/ Move Canvas" />
|
|
341
|
-
<Card.Content description="Zoom: Use MOUSE WHEEL to zoom in/out" />
|
|
342
|
-
<Card.Content description="Move: Hold MOUSE WHEEL and move mouse. Or Use W/A/S/D keys to move camera up/left/down/right" />
|
|
343
|
-
</Card>
|
|
344
|
-
<Card>
|
|
345
|
-
<Card.Content header="TAB navigation" />
|
|
346
|
-
<Card.Content description="You can traverse all visible annotation by hitting TAB." />
|
|
347
|
-
</Card>
|
|
348
|
-
<Card>
|
|
349
|
-
<Card.Content header="Next/Prev image navigation" />
|
|
350
|
-
<Card.Content description="Get next image by hitting ARROW_RIGHT key. Get previous image by hitting ARROW_LEFT key." />
|
|
351
|
-
</Card>
|
|
352
|
-
<Card>
|
|
353
|
-
<Card.Content header="Copy and Paste annotations" />
|
|
354
|
-
<Card.Content description="Copy: 1.) Select annotation 2.) Hit STRG + C" />
|
|
355
|
-
<Card.Content description="Paste: STRG + V" />
|
|
356
|
-
</Card>
|
|
357
|
-
<Card>
|
|
358
|
-
<Card.Content header="Mark image as junk" />
|
|
359
|
-
<Card.Content description="1.) Press J key" />
|
|
360
|
-
</Card>
|
|
361
|
-
<Card>
|
|
362
|
-
<Card.Content header="Assign a comment to a 2D annoation" />
|
|
363
|
-
<Card.Content description="1.) Select annotation 2.) Hit C key" />
|
|
364
|
-
</Card>
|
|
365
|
-
</Card.Group>
|
|
366
|
-
</div>
|
|
367
|
-
}
|
|
368
|
-
/>
|
|
369
|
-
</>
|
|
370
|
-
);
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
const renderImgLabelInput = () => {
|
|
374
|
-
if (!props.enabled.imgLabel) return null;
|
|
375
|
-
if (props.canvasConfig.img.actions.label) {
|
|
376
|
-
return (
|
|
377
|
-
<ToolbarItem
|
|
378
|
-
// active={this.props.imgLabelInput.show}
|
|
379
|
-
onClick={() => toggleImgLabelInput()}
|
|
380
|
-
faIcon={faTag}
|
|
381
|
-
/>
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
const renderImageSearch = () => {
|
|
387
|
-
if (!props.enabled.imgSearch) return null;
|
|
388
|
-
|
|
389
|
-
return (
|
|
390
|
-
<ToolbarItem
|
|
391
|
-
faIcon={faSearch}
|
|
392
|
-
onClick={() => {
|
|
393
|
-
if (props.onImgageSearchClicked) return props.onImgageSearchClicked();
|
|
394
|
-
}}
|
|
395
|
-
/>
|
|
396
|
-
);
|
|
397
|
-
};
|
|
398
|
-
|
|
399
|
-
const renderFullscreenBtn = () => {
|
|
400
|
-
if (!props.enabled.fullscreen) return null;
|
|
401
|
-
return (
|
|
402
|
-
<ToolbarItem
|
|
403
|
-
active={props.active.fullscreen}
|
|
404
|
-
onClick={() => toggleFullscreen()}
|
|
405
|
-
faIcon={faMaximize}
|
|
406
|
-
/>
|
|
407
|
-
);
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
const renderSettingBtn = () => {
|
|
411
|
-
if (!props.enabled.settings) return null;
|
|
412
|
-
|
|
413
|
-
return (
|
|
414
|
-
<SIASettingButton
|
|
415
|
-
enabled={props.enabled.settings}
|
|
416
|
-
uiConfig={props.uiConfig}
|
|
417
|
-
onSettingEvent={(e, data) => triggerToolBarEvent(e, data)}
|
|
418
|
-
toolbarItemStyle={toolbarItemStyle}
|
|
419
|
-
/>
|
|
420
|
-
);
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
const renderFilterBtn = () => {
|
|
424
|
-
if (!props.enabled.filter) return null;
|
|
425
|
-
if (!props.filter) return null;
|
|
426
|
-
return (
|
|
427
|
-
<SIAFilterButton
|
|
428
|
-
enabled={props.enabled.filter}
|
|
429
|
-
onFilterEvent={(e, data) => triggerToolBarEvent(e, data)}
|
|
430
|
-
filter={props.filter}
|
|
431
|
-
imageMeta={props.imageMeta}
|
|
432
|
-
toolbarItemStyle={toolbarItemStyle}
|
|
433
|
-
/>
|
|
434
|
-
);
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
if (!props.enabled) return null;
|
|
438
|
-
|
|
439
|
-
return (
|
|
440
|
-
<div
|
|
441
|
-
ref={toolBarGroup}
|
|
442
|
-
style={{ position: "fixed", top: position.top, left: position.left }}
|
|
443
|
-
>
|
|
444
|
-
<CSidebar narrow className="sia-toolbar">
|
|
445
|
-
<CSidebarNav>
|
|
446
|
-
{renderSettingBtn()}
|
|
447
|
-
{renderFilterBtn()}
|
|
448
|
-
{renderSaveButton()}
|
|
449
|
-
{renderImgLabelInput()}
|
|
450
|
-
{renderImageSearch()}
|
|
451
|
-
{renderNavigation()}
|
|
452
|
-
{renderToolButtons()}
|
|
453
|
-
{renderJunkButton()}
|
|
454
|
-
{renderDeleteAllAnnosButton()}
|
|
455
|
-
{renderFullscreenBtn()}
|
|
456
|
-
{renderHelpButton()}
|
|
457
|
-
</CSidebarNav>
|
|
458
|
-
</CSidebar>
|
|
459
|
-
</div>
|
|
460
|
-
);
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
export default ToolBar;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CButton, CButtonGroup } from "@coreui/react";
|
|
2
|
-
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
-
import { faArrowLeft, faArrowRight } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
-
|
|
6
|
-
type NavigationButtonProps = {};
|
|
7
|
-
|
|
8
|
-
const NavigationButtons = ({}: NavigationButtonProps) => {
|
|
9
|
-
return (
|
|
10
|
-
<CButtonGroup>
|
|
11
|
-
<CButton color="primary" variant="outline" onClick={() => {}}>
|
|
12
|
-
<FontAwesomeIcon icon={faArrowLeft as IconProp} size="lg" />
|
|
13
|
-
</CButton>
|
|
14
|
-
<CButton color="primary" variant="outline" onClick={() => {}}>
|
|
15
|
-
<FontAwesomeIcon icon={faArrowRight as IconProp} size="lg" />
|
|
16
|
-
</CButton>
|
|
17
|
-
</CButtonGroup>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default NavigationButtons;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { CNavItem } from "@coreui/react";
|
|
2
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
|
|
4
|
-
const ToolbarItem = ({
|
|
5
|
-
active = false,
|
|
6
|
-
disabled = false,
|
|
7
|
-
faIcon,
|
|
8
|
-
siaIcon,
|
|
9
|
-
onClick,
|
|
10
|
-
}) => {
|
|
11
|
-
let color = "white";
|
|
12
|
-
if (active) color = "red";
|
|
13
|
-
if (disabled) color = "grey";
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<CNavItem>
|
|
17
|
-
<div
|
|
18
|
-
className="sia-toolbar-item"
|
|
19
|
-
onClick={() => {
|
|
20
|
-
if (!disabled && onClick) onClick();
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
{faIcon && <FontAwesomeIcon icon={faIcon} size="lg" color={color} />}
|
|
24
|
-
{siaIcon && <span style={{ color: color }}>{siaIcon}</span>}
|
|
25
|
-
</div>
|
|
26
|
-
</CNavItem>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default ToolbarItem;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { CCol, CContainer, CRow } from "@coreui/react";
|
|
3
|
-
import TagLabel from "./TagLabel";
|
|
4
|
-
import LabelInput from "../../../Canvas/LabelInput";
|
|
5
|
-
import Label from "../../../models/Label";
|
|
6
|
-
|
|
7
|
-
type ImageLabelProps = {
|
|
8
|
-
possibleLabels: Label[];
|
|
9
|
-
selectedLabelIds?: number[];
|
|
10
|
-
onImageLabelsChanged?: (selectedImageIds: number[]) => void;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const ImageLabel = ({
|
|
14
|
-
possibleLabels,
|
|
15
|
-
selectedLabelIds = [],
|
|
16
|
-
onImageLabelsChanged = () => {},
|
|
17
|
-
}: ImageLabelProps) => {
|
|
18
|
-
const getSelectedLabels = () => {
|
|
19
|
-
const selectedLabels: Label[] = possibleLabels.filter((label: Label) =>
|
|
20
|
-
selectedLabelIds.includes(label.id),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
return selectedLabels;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const renderLabels = () => {
|
|
27
|
-
const selectedLabels = getSelectedLabels();
|
|
28
|
-
return selectedLabels.map((label: Label) => (
|
|
29
|
-
<CCol>
|
|
30
|
-
<TagLabel name={label.name} color={label.color} />
|
|
31
|
-
</CCol>
|
|
32
|
-
));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<CContainer>
|
|
37
|
-
<CRow>
|
|
38
|
-
<CCol>
|
|
39
|
-
<CRow>
|
|
40
|
-
<b>Selected Labels:</b>
|
|
41
|
-
</CRow>
|
|
42
|
-
<CRow xs={{ gutterY: 1 }}>{renderLabels()}</CRow>
|
|
43
|
-
</CCol>
|
|
44
|
-
<CCol>
|
|
45
|
-
<CRow>
|
|
46
|
-
<b>Change selection:</b>
|
|
47
|
-
</CRow>
|
|
48
|
-
<CRow style={{ minWidth: 250, minHeight: 100 }}>
|
|
49
|
-
<LabelInput
|
|
50
|
-
isMultilabel={true}
|
|
51
|
-
selectedLabelsIds={selectedLabelIds}
|
|
52
|
-
possibleLabels={possibleLabels}
|
|
53
|
-
onLabelSelect={onImageLabelsChanged}
|
|
54
|
-
/>
|
|
55
|
-
</CRow>
|
|
56
|
-
</CCol>
|
|
57
|
-
</CRow>
|
|
58
|
-
</CContainer>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default ImageLabel;
|
package/src/Toolbar.css
DELETED
package/src/ToolbarItem.jsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CNavItem } from "@coreui/react";
|
|
2
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
import "./Toolbar.css";
|
|
4
|
-
|
|
5
|
-
const ToolbarItem = ({
|
|
6
|
-
active = false,
|
|
7
|
-
disabled = false,
|
|
8
|
-
faIcon,
|
|
9
|
-
siaIcon,
|
|
10
|
-
onClick,
|
|
11
|
-
color = "white",
|
|
12
|
-
}) => {
|
|
13
|
-
if (active) color = "red";
|
|
14
|
-
if (disabled) color = "grey";
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<CNavItem>
|
|
18
|
-
<div
|
|
19
|
-
className="sia-toolbar-item"
|
|
20
|
-
onClick={() => {
|
|
21
|
-
if (!disabled && onClick) onClick();
|
|
22
|
-
}}
|
|
23
|
-
>
|
|
24
|
-
{faIcon && <FontAwesomeIcon icon={faIcon} size="lg" color={color} />}
|
|
25
|
-
{siaIcon && <span style={{ color: color }}>{siaIcon}</span>}
|
|
26
|
-
</div>
|
|
27
|
-
</CNavItem>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default ToolbarItem;
|
package/src/filterTools.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import AnnotationStatus from "./AnnotationStatus";
|
|
2
|
-
import AnnotationTool from "./AnnotationTool";
|
|
3
|
-
import { Point } from "../types";
|
|
4
|
-
|
|
5
|
-
type ExternalAnnotation = {
|
|
6
|
-
externalId?: string;
|
|
7
|
-
annoTime?: number;
|
|
8
|
-
coordinates: Point[];
|
|
9
|
-
status: AnnotationStatus;
|
|
10
|
-
labelIds: number[];
|
|
11
|
-
type: AnnotationTool;
|
|
12
|
-
timestamp?: DOMHighResTimeStamp;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default ExternalAnnotation;
|
package/src/models/Label.tsx
DELETED