Skip to content

Commit 3763414

Browse files
author
Boris Sekachev
committed
Hide bounding box after the first result was received from the server
1 parent 8276be1 commit 3763414

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cvat-canvas/src/typescript/interactionHandler.ts

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ export class InteractionHandlerImpl implements InteractionHandler {
140140
this.interactionShapes = this.interactionShapes.filter(
141141
(shape: SVG.Shape): boolean => shape !== self,
142142
);
143+
if (this.interactionData.startWithBox && this.interactionShapes.length === 1) {
144+
this.interactionShapes[0].removeClass('cvat_canvas_hidden');
145+
}
143146
this.shapesWereUpdated = true;
144147
if (this.shouldRaiseEvent(_e.ctrlKey)) {
145148
this.onInteraction(this.prepareResult(), true, false);
@@ -401,6 +404,9 @@ export class InteractionHandlerImpl implements InteractionHandler {
401404
if (interactionData.intermediateShape) {
402405
this.intermediateShape = interactionData.intermediateShape;
403406
this.updateIntermediateShape();
407+
if (this.interactionData.startWithBox) {
408+
this.interactionShapes[0].addClass('cvat_canvas_hidden');
409+
}
404410
} else if (interactionData.enabled) {
405411
this.interactionData = interactionData;
406412
this.initInteraction();

0 commit comments

Comments
 (0)