Skip to content

Commit

Permalink
Minor changes (#119)
Browse files Browse the repository at this point in the history
* Eslint fixes
* Update CHANGELOG.md
* Fix couple UI inconveniences
  • Loading branch information
bsekachev authored and nmanovic committed Oct 4, 2018
1 parent 6e9a597 commit b36b743
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions cvat/apps/engine/static/engine/js/annotationUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -366,9 +367,13 @@ function setupShortkeys(shortkeys, models) {
break;
case 'groupping':
models.shapeGrouper.cancel();
break
break;
case 'paste':
models.shapeBuffer.switchPaste();
break;
case 'poly_editing':
models.shapeEditor.finish();
break;
}
return false;
});
Expand Down
16 changes: 9 additions & 7 deletions cvat/apps/engine/static/engine/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
12 changes: 4 additions & 8 deletions cvat/apps/engine/static/engine/js/shapeCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -1177,7 +1174,6 @@ class ShapeCollectionView {
}.bind(this));

$('#shapeContextMenu li').click((e) => {
let menu = $('#shapeContextMenu');
$('.custom-menu').hide(100);

switch($(e.target).attr("action")) {
Expand Down Expand Up @@ -1324,7 +1320,7 @@ class ShapeCollectionView {
mainDiv[0].updateState = function() {
lockButton[0].updateState();
hiddenButton[0].updateState();
}
};

this._labelsContent.append(mainDiv);
}
Expand Down Expand Up @@ -1399,7 +1395,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 {
Expand All @@ -1411,7 +1407,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]);
}
}

Expand Down

0 comments on commit b36b743

Please sign in to comment.