mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 13:32:28 -05:00
Allow erase through groups
This commit is contained in:
parent
09ef88cac1
commit
e425fc6dcb
1 changed files with 3 additions and 3 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue