From 0cd1b40c57755bb5b63f01f7bb9637e1061eb93c Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 2 Jun 2020 16:57:14 -0400 Subject: [PATCH] Make sure clicking the first node finishes drawing when drawing any closed way --- modules/behavior/draw_way.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/behavior/draw_way.js b/modules/behavior/draw_way.js index 73d240e16..2afdfbf56 100644 --- a/modules/behavior/draw_way.js +++ b/modules/behavior/draw_way.js @@ -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; }