From ed098aaba8631cc97e4f946beff658287eb60443 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 4 Oct 2018 16:07:04 +0300 Subject: [PATCH 1/3] Eslint fixes --- cvat/apps/engine/static/engine/js/annotationUI.js | 3 ++- cvat/apps/engine/static/engine/js/shapeCollection.js | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/annotationUI.js b/cvat/apps/engine/static/engine/js/annotationUI.js index df31d9e5a6f5..682813928bf9 100644 --- a/cvat/apps/engine/static/engine/js/annotationUI.js +++ b/cvat/apps/engine/static/engine/js/annotationUI.js @@ -366,9 +366,10 @@ function setupShortkeys(shortkeys, models) { break; case 'groupping': models.shapeGrouper.cancel(); - break + break; case 'paste': models.shapeBuffer.switchPaste(); + break; } return false; }); diff --git a/cvat/apps/engine/static/engine/js/shapeCollection.js b/cvat/apps/engine/static/engine/js/shapeCollection.js index 9a1276e8b08e..629a747cdac0 100644 --- a/cvat/apps/engine/static/engine/js/shapeCollection.js +++ b/cvat/apps/engine/static/engine/js/shapeCollection.js @@ -1177,7 +1177,6 @@ class ShapeCollectionView { }.bind(this)); $('#shapeContextMenu li').click((e) => { - let menu = $('#shapeContextMenu'); $('.custom-menu').hide(100); switch($(e.target).attr("action")) { @@ -1324,7 +1323,7 @@ class ShapeCollectionView { mainDiv[0].updateState = function() { lockButton[0].updateState(); hiddenButton[0].updateState(); - } + }; this._labelsContent.append(mainDiv); } @@ -1399,7 +1398,7 @@ class ShapeCollectionView { view.erase(); if (newIdx != -1 && (frameChanged || significantUpdate)) { - drawView.call(this, newShapes[newIdx], newModels[newIdx]) + drawView.call(this, newShapes[newIdx], newModels[newIdx]); } } else { @@ -1411,7 +1410,7 @@ class ShapeCollectionView { // Now we need draw new models which aren't on previous collection for (let newIdx = 0; newIdx < newModels.length; newIdx ++) { if (!this._currentModels.includes(newModels[newIdx])) { - drawView.call(this, newShapes[newIdx], newModels[newIdx]) + drawView.call(this, newShapes[newIdx], newModels[newIdx]); } } From ae5edda93a24d8a7d3fa30e300d3959738733d6e Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 4 Oct 2018 16:19:19 +0300 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d36b77188113..42491946555c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,16 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- CVAT URL contains frame number and filter string. So, now you can create URL to frames and to objects. +- Ability to copy Object URL and Frame URL via object context menu and player context menu respectively. - Ability to change opacity for selected shape with help "Selected Fill Opacity" slider. - Ability to remove polyshapes points by double click. -- Ability to draw/change polyshapes (except for points) by slip method. Just press ENTER and moving a cursor. +- Ability to draw/change polyshapes (except for points) by slip method. Just press ENTER and moving a cursor. +- Ability to switch lock/hide properties via label UI element (in right menu) for all objects with same label. +- Shortcuts for outside/keyframe properties ### Changed - Polyshape editing method has been improved. You can redraw part of shape instead of points cloning. +- Unified shortcut (Esc) for close any mode instead of different shortcuts (Alt+N, Alt+G, Alt+M etc.). ### Fixed - Performance bottleneck has been fixed during you create new objects (draw, copy, merge etc). +- Label UI elements aren't updated after changelabel. +- Attribute annotation mode can use invalid shape position after resize or move shapes. ## [0.2.0] - 2018-09-28 From 09c1ce50f0246663d10fb52c74f1f71bff331af3 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Thu, 4 Oct 2018 16:52:26 +0300 Subject: [PATCH 3/3] Fix couple UI inconveniences --- .../apps/engine/static/engine/js/annotationUI.js | 6 +++++- cvat/apps/engine/static/engine/js/player.js | 16 +++++++++------- .../engine/static/engine/js/shapeCollection.js | 5 +---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/annotationUI.js b/cvat/apps/engine/static/engine/js/annotationUI.js index 682813928bf9..036845e921e6 100644 --- a/cvat/apps/engine/static/engine/js/annotationUI.js +++ b/cvat/apps/engine/static/engine/js/annotationUI.js @@ -188,7 +188,8 @@ function buildAnnotationUI(job, shapeData, loadJobEvent) { shapeCreator: shapeCreatorModel, shapeMerger: shapeMergerModel, shapeGrouper: shapeGrouperModel, - shapeBuffer: shapeBufferModel + shapeBuffer: shapeBufferModel, + shapeEditor: polyshapeEditorModel }); $(window).on('click', function(event) { @@ -370,6 +371,9 @@ function setupShortkeys(shortkeys, models) { case 'paste': models.shapeBuffer.switchPaste(); break; + case 'poly_editing': + models.shapeEditor.finish(); + break; } return false; }); diff --git a/cvat/apps/engine/static/engine/js/player.js b/cvat/apps/engine/static/engine/js/player.js index 9c3c5d78e897..bc298d518369 100644 --- a/cvat/apps/engine/static/engine/js/player.js +++ b/cvat/apps/engine/static/engine/js/player.js @@ -783,13 +783,15 @@ class PlayerView { } }); - this._playerContentUI.on('contextmenu.playerContextMenu', (e) => { - $('.custom-menu').hide(100); - this._contextMenuUI.finish().show(100).offset({ - top: e.pageY - 10, - left: e.pageX - 10, - }); - e.preventDefault(); + this._playerUI.on('contextmenu.playerContextMenu', (e) => { + if (!window.cvat.mode) { + $('.custom-menu').hide(100); + this._contextMenuUI.finish().show(100).offset({ + top: e.pageY - 10, + left: e.pageX - 10, + }); + e.preventDefault(); + } }); this._playerContentUI.on('mousedown.playerContextMenu', () => { diff --git a/cvat/apps/engine/static/engine/js/shapeCollection.js b/cvat/apps/engine/static/engine/js/shapeCollection.js index 629a747cdac0..1d7207adf259 100644 --- a/cvat/apps/engine/static/engine/js/shapeCollection.js +++ b/cvat/apps/engine/static/engine/js/shapeCollection.js @@ -1161,10 +1161,7 @@ class ShapeCollectionView { }); this._frameContent.on('mousemove', function(e) { - if (e.ctrlKey || e.shiftKey || e.which === 2 || e.target.classList.contains('svg_select_points')) { - if (e.shiftKey) { - this._controller.resetActive(); - } + if (e.ctrlKey || e.which === 2 || e.target.classList.contains('svg_select_points')) { return; }