Commit f2bb3993 by Brandon DeRosier Committed by GitHub

Merge pull request #10 from open-craft/bdero/port-sven-changes

Port fix for drawing vectors with id 0
parents 055e1166 d8e45005
...@@ -422,7 +422,7 @@ function VectorDrawXBlock(runtime, element, init_args) { ...@@ -422,7 +422,7 @@ function VectorDrawXBlock(runtime, element, init_args) {
var selected = this.getSelectedElement(); var selected = this.getSelectedElement();
var coords = this.getMouseCoords(evt); var coords = this.getMouseCoords(evt);
var targetObjects = this.objectsUnderMouse(coords); 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]]; var point_coords = [coords.usrCoords[1], coords.usrCoords[2]];
if (selected.type === 'vector') { if (selected.type === 'vector') {
this.drawMode = true; 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