Set sketch cursor to last appended coordinate
This commit is contained in:
@@ -1047,18 +1047,17 @@ class Draw extends PointerInteraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove last coordinate from sketch drawing (this coordinate follows cursor position)
|
// Remove last coordinate from sketch drawing (this coordinate follows cursor position)
|
||||||
const ending = sketchCoords.pop();
|
sketchCoords.pop();
|
||||||
|
|
||||||
// Append coordinate list
|
// Append coordinate list
|
||||||
for (let i = 0; i < coordinates.length; i++) {
|
for (let i = 0; i < coordinates.length; i++) {
|
||||||
this.addToDrawing_(coordinates[i]);
|
this.addToDrawing_(coordinates[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Duplicate last coordinate for sketch drawing
|
const ending = coordinates[coordinates.length - 1];
|
||||||
|
// Duplicate last coordinate for sketch drawing (cursor position)
|
||||||
this.addToDrawing_(ending);
|
this.addToDrawing_(ending);
|
||||||
this.modifyDrawing_(
|
this.modifyDrawing_(ending);
|
||||||
this.downPx_ ? this.getMap().getCoordinateFromPixel(this.downPx_) : ending
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user