Skip to content

Commit 25164fe

Browse files
bsekachevnmanovic
authored andcommitted
Fixed: Uncaught TypeError: Cannot read property 'nodeValue' of undefined (#1068)
1 parent 2cc2e32 commit 25164fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cvat/apps/engine/static/engine/js/shapeCreator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ class ShapeCreatorView {
321321
};
322322

323323
let numberOfPoints = 0;
324+
this._drawInstance.attr({
325+
z_order: Number.MAX_SAFE_INTEGER,
326+
});
324327

325328
if (this._polyShapeSize) {
326329
let size = this._polyShapeSize;
@@ -467,6 +470,7 @@ class ShapeCreatorView {
467470
case 'box':
468471
this._drawInstance = this._frameContent.rect().draw({ snapToGrid: 0.1 }).addClass('shapeCreation').attr({
469472
'stroke-width': STROKE_WIDTH / this._scale,
473+
z_order: Number.MAX_SAFE_INTEGER,
470474
}).on('drawstop', function(e) {
471475
if (this._cancel) return;
472476
if (sizeUI) {
@@ -545,10 +549,6 @@ class ShapeCreatorView {
545549
default:
546550
throw Error(`Bad type found ${this._type}`);
547551
}
548-
549-
this._drawInstance.attr({
550-
'z_order': Number.MAX_SAFE_INTEGER,
551-
});
552552
}
553553

554554
_rescaleDrawPoints() {

0 commit comments

Comments
 (0)