From a80aaf65dbd0dcf688ce2e783c4799187c56788f Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 5 Feb 2019 11:42:45 -0500 Subject: [PATCH] Improve performance when checking way for self-intersection when drawing --- modules/behavior/draw_way.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/behavior/draw_way.js b/modules/behavior/draw_way.js index d980bc26b..5b618b47c 100644 --- a/modules/behavior/draw_way.js +++ b/modules/behavior/draw_way.js @@ -117,7 +117,8 @@ export function behaviorDrawWay(context, wayId, index, mode, startGraph) { for (var i = 0; i < parents.length; i++) { var parent = parents[i]; - var nodes = parent.nodes.map(function(nodeID) { return graph.entity(nodeID); }); + + var nodes = graph.childNodes(parent); if (origWay.isClosed()) { // Check if Area if (finishDraw) {