Skip to content

Commit 4aa53b4

Browse files
committed
Add clean up after closing menu
1 parent f268f8a commit 4aa53b4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

frontend/components/tasks/sequenceLabeling/EntityEditor.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
:position-y="y"
2323
absolute
2424
offset-y
25+
@input="cleanUp"
2526
>
2627
<v-list
2728
dense
@@ -200,10 +201,7 @@ export default Vue.extend({
200201
} else {
201202
this.addEntity(labelId)
202203
}
203-
this.showMenu = false
204-
this.startOffset = 0
205-
this.endOffset = 0
206-
this.entity = null
204+
this.cleanUp()
207205
},
208206
209207
addEntity(labelId: number) {
@@ -216,8 +214,14 @@ export default Vue.extend({
216214
217215
deleteEntity(entity: any) {
218216
this.$emit('contextmenu:entity', entity.id)
219-
this.entity = null
217+
this.cleanUp()
218+
},
219+
220+
cleanUp() {
220221
this.showMenu = false
222+
this.entity = null
223+
this.startOffset = 0
224+
this.endOffset = 0
221225
},
222226
223227
updateRelation() {

0 commit comments

Comments
 (0)