Merge pull request #73 from fsih/eraseThroughGroups

Allow erase through groups
This commit is contained in:
DD Liu 2017-10-20 14:15:54 -04:00 committed by GitHub
commit da15ed392a

View file

@ -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 () {