lost-sia 2.0.0-alpha10 → 2.0.0-alpha13
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/package.json +1 -1
- package/src/Canvas.jsx +3 -3
- package/src/filterTools.js +3 -0
- package/src/index.js +13 -11
- package/src/types/notificationType.js +2 -0
- package/src/utils/annoConversion.js +2 -2
package/package.json
CHANGED
package/src/Canvas.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from "react";
|
|
2
|
-
|
|
2
|
+
const _ = require("lodash");
|
|
3
3
|
import Annotation from "./Annotation/Annotation";
|
|
4
4
|
import AnnoLabelInput from "./AnnoLabelInput";
|
|
5
5
|
import ImgBar from "./ImgBar";
|
|
@@ -929,7 +929,7 @@ class Canvas extends Component {
|
|
|
929
929
|
// const corrected = transform.correctAnnotation(anno.data, this.props.svg, this.props.imageOffset)
|
|
930
930
|
if (this.clipboard) {
|
|
931
931
|
// let annos = [...this.state.annos]
|
|
932
|
-
const uid = uniqueId("new");
|
|
932
|
+
const uid = _.uniqueId("new");
|
|
933
933
|
// this.handleAnnoEvent()
|
|
934
934
|
const newData = this.clipboard.data.map((e) => {
|
|
935
935
|
return { x: e.x + offset, y: e.y + offset };
|
|
@@ -1364,7 +1364,7 @@ class Canvas extends Component {
|
|
|
1364
1364
|
const mousePos = this.getMousePosition(e);
|
|
1365
1365
|
// const selAnno = this.findAnno(this.state.selectedAnnoId)
|
|
1366
1366
|
let newAnno = {
|
|
1367
|
-
id: this.props.nextAnnoId ? this.props.nextAnnoId : uniqueId("new"),
|
|
1367
|
+
id: this.props.nextAnnoId ? this.props.nextAnnoId : _.uniqueId("new"),
|
|
1368
1368
|
type: this.props.selectedTool,
|
|
1369
1369
|
data: [
|
|
1370
1370
|
{
|
package/src/filterTools.js
CHANGED
package/src/index.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import "semantic-ui-css/semantic.min.css";
|
|
2
2
|
import "./scss/style.scss";
|
|
3
|
+
import './SIA.scss'
|
|
4
|
+
|
|
3
5
|
// import { default as Canvas } from './Canvas'
|
|
4
6
|
// import { default as Toolbar } from './ToolBar'
|
|
5
|
-
export { default as Canvas } from "./Canvas";
|
|
7
|
+
export { default as Canvas } from "./Canvas.jsx";
|
|
6
8
|
|
|
7
9
|
// export { Canvas }
|
|
8
10
|
// export { Toolbar }
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
export { default as Sia } from './Sia'
|
|
12
|
-
export { default as dummyData } from './siaDummyData'
|
|
13
|
-
export { default as transform } from './utils/transform'
|
|
14
|
-
export { default as annoConversion } from './utils/annoConversion'
|
|
15
|
-
export {
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
|
|
13
|
+
export { default as Sia } from './Sia.jsx'
|
|
14
|
+
export { default as dummyData } from './siaDummyData.js'
|
|
15
|
+
export { default as transform } from './utils/transform.js'
|
|
16
|
+
export { default as annoConversion } from './utils/annoConversion.js'
|
|
17
|
+
export { uiConfig,SIA_INITIAL_UI_CONFIG } from './utils/uiConfig.js'
|
|
18
|
+
export { default as canvasActions } from './types/canvasActions.js'
|
|
19
|
+
export { default as toolbarEvents } from './types/toolbarEvents.js'
|
|
20
|
+
export { default as tools } from './types/tools.js'
|
|
21
|
+
export { default as filterTools } from './filterTools.js'
|
|
22
|
+
export { default as notificationType } from './types/notificationType.js'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as transform from "./transform";
|
|
2
2
|
import * as annoStatus from "../types/annoStatus";
|
|
3
3
|
import * as modes from "../types/modes";
|
|
4
|
-
|
|
4
|
+
const _ = require("lodash");
|
|
5
5
|
|
|
6
6
|
function _fixBackendAnnoElement(element) {
|
|
7
7
|
return {
|
|
8
8
|
...element,
|
|
9
|
-
id: element.id ? element.id : uniqueId("new"),
|
|
9
|
+
id: element.id ? element.id : _.uniqueId("new"),
|
|
10
10
|
annoTime: element.annoTime ? element.annoTime : 0.0,
|
|
11
11
|
mode: element.mode ? element.mode : modes.VIEW,
|
|
12
12
|
status: element.status ? element.status : annoStatus.DATABASE,
|