Make sure clicking the first node finishes drawing when drawing any closed way

This commit is contained in:
Quincy Morgan
2020-06-02 16:57:14 -04:00
parent 5eb0fc3e0e
commit 0cd1b40c57

View File

@@ -384,7 +384,7 @@ export function behaviorDrawWay(context, wayID, mode, startGraph) {
// finish drawing if the mapper targets the prior node
if (node.id === _headNodeID ||
// or the first node when drawing an area
(_wayGeometry === 'area' && node.id === _origWay.first())) {
(_origWay.isClosed() && node.id === _origWay.first())) {
drawWay.finish();
return;
}