From 8dcb2711cda54725759e88ec2452171791c67564 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Fri, 28 Sep 2018 16:43:52 +0300 Subject: [PATCH 1/2] Bug has been fixed: impossible to lock/occlude object in AAM --- .../engine/static/engine/js/shapeCollection.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/shapeCollection.js b/cvat/apps/engine/static/engine/js/shapeCollection.js index d9132b9de310..3e7f62352723 100644 --- a/cvat/apps/engine/static/engine/js/shapeCollection.js +++ b/cvat/apps/engine/static/engine/js/shapeCollection.js @@ -897,19 +897,19 @@ class ShapeCollectionController { } switchActiveOccluded() { - if (!window.cvat.mode) { + if (!window.cvat.mode || window.cvat.mode === 'aam') { this._model.switchActiveOccluded(); } } switchAllLock() { - if (!window.cvat.mode) { + if (!window.cvat.mode || window.cvat.mode === 'aam') { this._model.switchAllLock(); } } switchActiveLock() { - if (!window.cvat.mode) { + if (!window.cvat.mode || window.cvat.mode === 'aam') { this._model.switchActiveLock(); } } @@ -1289,17 +1289,17 @@ class ShapeCollectionView { static sortByZOrder() { if (window.cvat.job.z_order) { let content = $('#frameContent'); - let shapes = content.find('.shape, .pointTempGroup, .shapeCreation, .aim').toArray().sort( + let shapes = $(content.find('.shape, .pointTempGroup, .shapeCreation, .aim').toArray().sort( (a,b) => (+a.attributes.z_order.nodeValue - +b.attributes.z_order.nodeValue) - ); + )); + let children = content.children().not(shapes); for (let shape of shapes) { content.append(shape); } - let texts = content.find('.shapeText'); - for (let text of texts) { - content.append(text); + for (let child of children) { + content.append(child); } } } From fda56d771ee4db285c12ea3487633364d9c9433a Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Fri, 28 Sep 2018 16:44:18 +0300 Subject: [PATCH 2/2] Bug has been fixed: invisible points actually are visible --- cvat/apps/engine/static/engine/js/shapes.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/shapes.js b/cvat/apps/engine/static/engine/js/shapes.js index 9c61f930dc7b..baa7bac17f1a 100644 --- a/cvat/apps/engine/static/engine/js/shapes.js +++ b/cvat/apps/engine/static/engine/js/shapes.js @@ -3081,9 +3081,11 @@ class PointsView extends PolyShapeView { _makeNotEditable() { PolyShapeView.prototype._makeNotEditable.call(this); - let interpolation = this._controller.interpolate(window.cvat.player.frames.current); - if (interpolation.position.points) { - this._drawPointMarkers(interpolation.position); + if (!this._controller.hiddenShape) { + let interpolation = this._controller.interpolate(window.cvat.player.frames.current); + if (interpolation.position.points) { + this._drawPointMarkers(interpolation.position); + } } }