diff --git a/cvat/apps/engine/static/engine/base.css b/cvat/apps/engine/static/engine/base.css index ce19a39b..30b2b128 100644 --- a/cvat/apps/engine/static/engine/base.css +++ b/cvat/apps/engine/static/engine/base.css @@ -98,8 +98,9 @@ html { border: none; outline: none; cursor: pointer; - padding: 14px 16px; + padding: 3px 0px; transition: 0.3s; + } .tab button:hover { diff --git a/cvat/apps/engine/static/engine/js/shapeCollection.js b/cvat/apps/engine/static/engine/js/shapeCollection.js index 1ee31a46..121dd94c 100644 --- a/cvat/apps/engine/static/engine/js/shapeCollection.js +++ b/cvat/apps/engine/static/engine/js/shapeCollection.js @@ -1247,8 +1247,17 @@ class ShapeCollectionView { view.erase(); } - this._currentViews = []; + // Save parents and detach elements from DOM + // in order to increase performance in the buildShapeView function + let parents = { + uis: this._UIContent.parent(), + shapes: this._frameContent.node.parentNode + } + + this._frameContent.node.parent = null; + this._UIContent.detach(); + this._currentViews = []; for (let shape of collection.currentShapes) { let model = shape.model; let view = buildShapeView(model, buildShapeController(model), this._frameContent, this._UIContent); @@ -1259,6 +1268,10 @@ class ShapeCollectionView { view.subscribe(this); this._labelsContent.find(`.labelContentElement[label_id="${model.label}"]`).removeClass('hidden'); } + + parents.shapes.append(this._frameContent.node); + parents.uis.prepend(this._UIContent); + ShapeCollectionView.sortByZOrder(); } diff --git a/cvat/apps/engine/static/engine/stylesheet.css b/cvat/apps/engine/static/engine/stylesheet.css index 2a9306ac..4e53b72d 100644 --- a/cvat/apps/engine/static/engine/stylesheet.css +++ b/cvat/apps/engine/static/engine/stylesheet.css @@ -356,6 +356,9 @@ .customizedTab { border-radius: 5px 5px 0px 0px; width: 100%; + width: 15%; + float: left; + margin: 0px 10px; } /* ----------------------- IDs ----------------------- */ @@ -392,7 +395,9 @@ } #uiContent, #trackManagement, #aamMenu, #labelsContent { - border: 1px black solid; + border-bottom: 1px solid black; + border-right: 1px solid black; + border-left: 1px solid black; border-radius: 5px; box-shadow: 0 0 5px rgba(0,0,0,0.5); background-color: #B0C4DE; diff --git a/cvat/apps/engine/templates/engine/annotation.html b/cvat/apps/engine/templates/engine/annotation.html index 124fd0d8..2b12d634 100644 --- a/cvat/apps/engine/templates/engine/annotation.html +++ b/cvat/apps/engine/templates/engine/annotation.html @@ -375,11 +375,12 @@ + +