Browse Source

Unselect the region on clicking outside of the region

pull/1899/head
Hironsan 2 years ago
parent
commit
e742fa14e4
1 changed files with 4 additions and 0 deletions
  1. 4
      frontend/components/tasks/boundingBox/VBoundingBox.vue

4
frontend/components/tasks/boundingBox/VBoundingBox.vue

@ -179,8 +179,12 @@ export default Vue.extend({
onMouseDown(e: Konva.KonvaEventObject<MouseEvent>) {
if (e.target instanceof Konva.Image) {
// while new polygon is creating, prevent to select polygon.
const clickedOutsideOfRectangle = !!this.selectedRectangle
this.selectedRectangle = null
this.updateTransformer()
if (clickedOutsideOfRectangle) {
return
}
}
// prevent multiple event.
if (e.target instanceof HTMLCanvasElement) {

Loading…
Cancel
Save