From e7ffa8761f8960cb2dee79dfc675539561298db1 Mon Sep 17 00:00:00 2001 From: Boris Sekachev <40690378+bsekachev@users.noreply.github.com> Date: Fri, 28 Sep 2018 17:49:30 +0300 Subject: [PATCH] Fixes from release 0.2 (#99) * Bug has been fixed: impossible to lock/occlude object in AAM * Bug has been fixed: invisible points actually are visible --- .../engine/static/engine/js/shapeCollection.js | 16 ++++++++-------- cvat/apps/engine/static/engine/js/shapes.js | 8 +++++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/shapeCollection.js b/cvat/apps/engine/static/engine/js/shapeCollection.js index d9132b9d..3e7f6235 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); } } } diff --git a/cvat/apps/engine/static/engine/js/shapes.js b/cvat/apps/engine/static/engine/js/shapes.js index 9c61f930..baa7bac1 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); + } } }