Minor changes (#119)

* Eslint fixes
* Update CHANGELOG.md
* Fix couple UI inconveniences
main
Boris Sekachev 7 years ago committed by Nikita Manovich
parent 6e9a597e12
commit b36b743c9a

@ -6,16 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added ### 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 change opacity for selected shape with help "Selected Fill Opacity" slider.
- Ability to remove polyshapes points by double click. - 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 ### Changed
- Polyshape editing method has been improved. You can redraw part of shape instead of points cloning. - 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 ### Fixed
- Performance bottleneck has been fixed during you create new objects (draw, copy, merge etc). - 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 ## [0.2.0] - 2018-09-28

@ -188,7 +188,8 @@ function buildAnnotationUI(job, shapeData, loadJobEvent) {
shapeCreator: shapeCreatorModel, shapeCreator: shapeCreatorModel,
shapeMerger: shapeMergerModel, shapeMerger: shapeMergerModel,
shapeGrouper: shapeGrouperModel, shapeGrouper: shapeGrouperModel,
shapeBuffer: shapeBufferModel shapeBuffer: shapeBufferModel,
shapeEditor: polyshapeEditorModel
}); });
$(window).on('click', function(event) { $(window).on('click', function(event) {
@ -366,9 +367,13 @@ function setupShortkeys(shortkeys, models) {
break; break;
case 'groupping': case 'groupping':
models.shapeGrouper.cancel(); models.shapeGrouper.cancel();
break break;
case 'paste': case 'paste':
models.shapeBuffer.switchPaste(); models.shapeBuffer.switchPaste();
break;
case 'poly_editing':
models.shapeEditor.finish();
break;
} }
return false; return false;
}); });

@ -783,13 +783,15 @@ class PlayerView {
} }
}); });
this._playerContentUI.on('contextmenu.playerContextMenu', (e) => { this._playerUI.on('contextmenu.playerContextMenu', (e) => {
$('.custom-menu').hide(100); if (!window.cvat.mode) {
this._contextMenuUI.finish().show(100).offset({ $('.custom-menu').hide(100);
top: e.pageY - 10, this._contextMenuUI.finish().show(100).offset({
left: e.pageX - 10, top: e.pageY - 10,
}); left: e.pageX - 10,
e.preventDefault(); });
e.preventDefault();
}
}); });
this._playerContentUI.on('mousedown.playerContextMenu', () => { this._playerContentUI.on('mousedown.playerContextMenu', () => {

@ -1161,10 +1161,7 @@ class ShapeCollectionView {
}); });
this._frameContent.on('mousemove', function(e) { this._frameContent.on('mousemove', function(e) {
if (e.ctrlKey || e.shiftKey || e.which === 2 || e.target.classList.contains('svg_select_points')) { if (e.ctrlKey || e.which === 2 || e.target.classList.contains('svg_select_points')) {
if (e.shiftKey) {
this._controller.resetActive();
}
return; return;
} }
@ -1177,7 +1174,6 @@ class ShapeCollectionView {
}.bind(this)); }.bind(this));
$('#shapeContextMenu li').click((e) => { $('#shapeContextMenu li').click((e) => {
let menu = $('#shapeContextMenu');
$('.custom-menu').hide(100); $('.custom-menu').hide(100);
switch($(e.target).attr("action")) { switch($(e.target).attr("action")) {
@ -1324,7 +1320,7 @@ class ShapeCollectionView {
mainDiv[0].updateState = function() { mainDiv[0].updateState = function() {
lockButton[0].updateState(); lockButton[0].updateState();
hiddenButton[0].updateState(); hiddenButton[0].updateState();
} };
this._labelsContent.append(mainDiv); this._labelsContent.append(mainDiv);
} }
@ -1399,7 +1395,7 @@ class ShapeCollectionView {
view.erase(); view.erase();
if (newIdx != -1 && (frameChanged || significantUpdate)) { if (newIdx != -1 && (frameChanged || significantUpdate)) {
drawView.call(this, newShapes[newIdx], newModels[newIdx]) drawView.call(this, newShapes[newIdx], newModels[newIdx]);
} }
} }
else { else {
@ -1411,7 +1407,7 @@ class ShapeCollectionView {
// Now we need draw new models which aren't on previous collection // Now we need draw new models which aren't on previous collection
for (let newIdx = 0; newIdx < newModels.length; newIdx ++) { for (let newIdx = 0; newIdx < newModels.length; newIdx ++) {
if (!this._currentModels.includes(newModels[newIdx])) { if (!this._currentModels.includes(newModels[newIdx])) {
drawView.call(this, newShapes[newIdx], newModels[newIdx]) drawView.call(this, newShapes[newIdx], newModels[newIdx]);
} }
} }

Loading…
Cancel
Save