Skip to content

Commit

Permalink
feat: 多边形完成标注操作跟拉框同步 - 未开启文本标注不默认选中
Browse files Browse the repository at this point in the history
  • Loading branch information
laoluo committed Dec 1, 2021
1 parent fd6be60 commit 34f2df6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/lb-annotation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sensetime/annotation",
"version": "1.5.0",
"version": "1.5.1",
"description": "Annotation tool collection",
"keywords": [
"annotation",
Expand Down Expand Up @@ -94,4 +94,4 @@
"color-rgba": "^2.3.0",
"lodash": "^4.17.20"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class PolygonOperation extends BasicToolOperation {
}
polygonList.push(newPolygon);

this.setSelectedID(id);
this.setSelectedIdAfterAddingDrawing(id);
}

this.setPolygonList(polygonList);
Expand All @@ -453,6 +453,18 @@ class PolygonOperation extends BasicToolOperation {
this.history.pushHistory(polygonList);
}

public setSelectedIdAfterAddingDrawing(newID: string) {
if (this.drawingPointList.length === 0) {
return;
}

if (this.config.textConfigurable) {
this.setSelectedID(newID);
} else {
this.setSelectedID();
}
}

/**
* 获取当前 hover 多边形的 ID
* @param e
Expand Down
4 changes: 2 additions & 2 deletions packages/lb-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@ant-design/icons": "^4.6.2",
"@sensetime/annotation": "1.5.0",
"@sensetime/annotation": "1.5.1",
"classnames": "^2.3.0",
"@sensetime/lb-utils": "^1.0.3",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -94,4 +94,4 @@
"path": "node_modules/cz-conventional-changelog"
}
}
}
}

0 comments on commit 34f2df6

Please sign in to comment.