lost-sia 2.0.0-alpha12 → 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/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
|
{
|
|
@@ -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,
|