Skip to content

Commit 340a740

Browse files
committed
fix: fix the bug of brush stop event bubble
1 parent 1ca8fa4 commit 340a740

File tree

1 file changed

+4
-1
lines changed
  • packages/vrender-components/src/brush

1 file changed

+4
-1
lines changed

packages/vrender-components/src/brush/brush.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export class Brush extends AbstractComponent<Required<BrushAttributes>> {
7272
* 3. 如果是绘制状态: 标记绘制状态 & 标记正在绘制的mask & 清除之前的mask & 添加新的mask
7373
*/
7474
private _onBrushStart = (e: FederatedPointerEvent) => {
75+
if (this._outOfInteractiveRange(e)) {
76+
return;
77+
}
7578
const {
7679
updateTrigger = DEFAULT_BRUSH_ATTRIBUTES.updateTrigger,
7780
endTrigger = DEFAULT_BRUSH_ATTRIBUTES.endTrigger,
@@ -398,7 +401,7 @@ export class Brush extends AbstractComponent<Required<BrushAttributes>> {
398401
cursor: 'move',
399402
pickable: false,
400403
...brushStyle,
401-
opacity: hasMask ? (brushStyle.opacity ?? 1) : 0
404+
opacity: hasMask ? brushStyle.opacity ?? 1 : 0
402405
});
403406
brushMask.name = `brush-${Date.now()}`; // 用Date给mask唯一标记
404407
this._operatingMask = brushMask;

0 commit comments

Comments
 (0)