From e425fc6dcbc206a3be09f6758fca24b92b215b97 Mon Sep 17 00:00:00 2001 From: DD Date: Thu, 19 Oct 2017 11:43:16 -0400 Subject: [PATCH] Allow erase through groups --- src/helper/blob-tools/blob.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helper/blob-tools/blob.js b/src/helper/blob-tools/blob.js index 5fed2544..0ed06d6e 100644 --- a/src/helper/blob-tools/blob.js +++ b/src/helper/blob-tools/blob.js @@ -195,7 +195,8 @@ class Blobbiness { // Get all path items to merge with const paths = paper.project.getItems({ match: function (item) { - return blob.isMergeable(lastPath, item); + return blob.isMergeable(lastPath, item) && + item.parent instanceof paper.Layer; // don't merge with nested in group } }); @@ -390,8 +391,7 @@ class Blobbiness { isMergeable (newPath, existingPath) { return existingPath instanceof paper.PathItem && // path or compound path existingPath !== this.cursorPreview && // don't merge with the mouse preview - existingPath !== newPath && // don't merge with self - existingPath.parent instanceof paper.Layer; // don't merge with nested in group + existingPath !== newPath; // don't merge with self } deactivateTool () {