From f5e8239c4d80674cddc85e016d7de039e5b79315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=9B=E7=9A=93?= Date: Thu, 10 Jun 2021 16:05:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=85=81=E8=AE=B8=E7=94=BB=E5=B8=83=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E4=BA=8B=E4=BB=B6=E7=9A=84=E5=86=92=E6=B3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/builtin-simulator/host.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/designer/src/builtin-simulator/host.ts b/packages/designer/src/builtin-simulator/host.ts index 0eb5c2429..4cb8199df 100644 --- a/packages/designer/src/builtin-simulator/host.ts +++ b/packages/designer/src/builtin-simulator/host.ts @@ -641,14 +641,16 @@ export class BuiltinSimulatorHost implements ISimulatorHost { if (!detecting.enable || this.designMode !== 'design') { return; } const nodeInst = this.getNodeInstanceFromElement(e.target as Element); detecting.capture(nodeInst?.node || null); - e.stopPropagation(); + if (!engineConfig.get('enableMouseEventPropagationInCanvas', false) || dragon.dragging) { + e.stopPropagation(); + } }; const leave = () => detecting.leave(this.project.currentDocument); @@ -659,7 +661,9 @@ export class BuiltinSimulatorHost implements ISimulatorHost { - e.stopPropagation(); + if (!engineConfig.get('enableMouseEventPropagationInCanvas', false) || dragon.dragging) { + e.stopPropagation(); + } }, true, );