From 1952b9067ad8dc8fffa50e40d7352c07405fc106 Mon Sep 17 00:00:00 2001 From: adroitwhiz Date: Fri, 8 Nov 2019 14:04:57 -0500 Subject: [PATCH] Skip processing of child paths in mergeEraser --- src/helper/blob-tools/blob.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helper/blob-tools/blob.js b/src/helper/blob-tools/blob.js index 60615f8532..70c68b6be1 100644 --- a/src/helper/blob-tools/blob.js +++ b/src/helper/blob-tools/blob.js @@ -263,8 +263,12 @@ class Blobbiness { class: paper.PathItem }); } - + for (let i = items.length - 1; i >= 0; i--) { + // If a path is part of a compound path, that parent path will later be processed. + // Skip processing the child path so as not to double-process it. + if (items[i].parent instanceof paper.CompoundPath) continue; + // TODO handle compound paths if (items[i] instanceof paper.Path && (!items[i].fillColor || items[i].fillColor._alpha === 0)) { // Gather path segments