mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
Skip processing of child paths in mergeEraser
This commit is contained in:
parent
cfa78969d1
commit
41e0765657
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ import SegmentBrushHelper from './segment-brush-helper';
|
|||
import {MIXED, styleCursorPreview} from '../../helper/style-path';
|
||||
import {clearSelection, getItems} from '../../helper/selection';
|
||||
import {getGuideLayer} from '../../helper/layer';
|
||||
import {isCompoundPathChild} from '../compound-path';
|
||||
|
||||
/**
|
||||
* Shared code for the brush and eraser mode. Adds functions on the paper tool object
|
||||
|
@ -263,8 +264,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 (isCompoundPathChild(items[i])) continue;
|
||||
|
||||
// TODO handle compound paths
|
||||
if (items[i] instanceof paper.Path && (!items[i].fillColor || items[i].fillColor._alpha === 0)) {
|
||||
// Gather path segments
|
||||
|
|
Loading…
Reference in a new issue