Skip to content

Commit

Permalink
Fixed: The function sortByZOrder() throws the exception if a frame co…
Browse files Browse the repository at this point in the history
…nsists any points (#236)
  • Loading branch information
bsekachev authored and nmanovic committed Dec 13, 2018
1 parent 7bad3dc commit d9eac60
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cvat/apps/engine/static/engine/js/shapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3116,14 +3116,15 @@ class PointsView extends PolyShapeView {
return;
}

this._uis.points = this._scenes.svg.group().fill(this._appearance.fill || this._appearance.colors.shape)
this._uis.points = this._scenes.svg.group()
.fill(this._appearance.fill || this._appearance.colors.shape)
.on('click', () => {
this._positionateMenus();
this._controller.click();
}).attr({
'z_order': position.z_order
}).addClass('pointTempGroup');

this._uis.points.node.setAttribute('z_order', position.z_order)

let points = PolyShapeModel.convertStringToNumberArray(position.points);
for (let point of points) {
let radius = POINT_RADIUS * 2 / window.cvat.player.geometry.scale;
Expand Down Expand Up @@ -3158,7 +3159,7 @@ class PointsView extends PolyShapeView {
let interpolation = this._controller.interpolate(window.cvat.player.frames.current);
if (interpolation.position.points) {
let points = window.cvat.translate.points.actualToCanvas(interpolation.position.points);
this._drawPointMarkers(Object.assign(interpolation.position.points, {points: points}));
this._drawPointMarkers(Object.assign(interpolation.position, {points: points}));
}
}
}
Expand Down

0 comments on commit d9eac60

Please sign in to comment.