parent ded76fc8
......@@ -422,7 +422,7 @@ function VectorDrawXBlock(runtime, element, init_args) {
var selected = this.getSelectedElement();
var coords = this.getMouseCoords(evt);
var targetObjects = this.objectsUnderMouse(coords);
if (selected.idx && (!targetObjects || _.all(targetObjects, this.canCreateVectorOnTopOf.bind(this)))) {
if (!_.isEmpty(selected) && (!targetObjects || _.all(targetObjects, this.canCreateVectorOnTopOf.bind(this)))) {
var point_coords = [coords.usrCoords[1], coords.usrCoords[2]];
if (selected.type === 'vector') {
this.drawMode = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment