From 25164fe8b692e2094b2f7658453cbfc1b7c834d4 Mon Sep 17 00:00:00 2001 From: Boris Sekachev <40690378+bsekachev@users.noreply.github.com> Date: Fri, 17 Jan 2020 16:11:34 +0300 Subject: [PATCH] Fixed: Uncaught TypeError: Cannot read property 'nodeValue' of undefined (#1068) --- cvat/apps/engine/static/engine/js/shapeCreator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cvat/apps/engine/static/engine/js/shapeCreator.js b/cvat/apps/engine/static/engine/js/shapeCreator.js index 247aa785..b7841bfe 100644 --- a/cvat/apps/engine/static/engine/js/shapeCreator.js +++ b/cvat/apps/engine/static/engine/js/shapeCreator.js @@ -321,6 +321,9 @@ class ShapeCreatorView { }; let numberOfPoints = 0; + this._drawInstance.attr({ + z_order: Number.MAX_SAFE_INTEGER, + }); if (this._polyShapeSize) { let size = this._polyShapeSize; @@ -467,6 +470,7 @@ class ShapeCreatorView { case 'box': this._drawInstance = this._frameContent.rect().draw({ snapToGrid: 0.1 }).addClass('shapeCreation').attr({ 'stroke-width': STROKE_WIDTH / this._scale, + z_order: Number.MAX_SAFE_INTEGER, }).on('drawstop', function(e) { if (this._cancel) return; if (sizeUI) { @@ -545,10 +549,6 @@ class ShapeCreatorView { default: throw Error(`Bad type found ${this._type}`); } - - this._drawInstance.attr({ - 'z_order': Number.MAX_SAFE_INTEGER, - }); } _rescaleDrawPoints() {