From 1046708e69fa777c041fe1f05016e05260eb2246 Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 30 Nov 2017 13:19:50 -0600 Subject: [PATCH] only include resulting layers for the current cutted layer --- src/js/Draw/L.PM.Draw.Cut.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/Draw/L.PM.Draw.Cut.js b/src/js/Draw/L.PM.Draw.Cut.js index e7f7f13a..752f2c2d 100644 --- a/src/js/Draw/L.PM.Draw.Cut.js +++ b/src/js/Draw/L.PM.Draw.Cut.js @@ -31,11 +31,11 @@ Draw.Cut = Draw.Poly.extend({ } }); - // the resulting layers after the cut - const resultingLayers = []; // loop through all layers that intersect with the drawn (cutting) layer layers.forEach((l) => { + // the resulting layers after the cut + const resultingLayers = []; // find layer difference const diff = difference(l.toGeoJSON(), layer.toGeoJSON());