From a3e6f7d6ae0ff3bf03e530cb8c952f401217b971 Mon Sep 17 00:00:00 2001 From: Aaron Date: Tue, 25 Jun 2024 19:24:37 +0800 Subject: [PATCH] refactor(behavior): destroyed element wont dispatch event (#5934) --- packages/g6/src/runtime/behavior.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/g6/src/runtime/behavior.ts b/packages/g6/src/runtime/behavior.ts index 773eaa3ed2..64b37970af 100644 --- a/packages/g6/src/runtime/behavior.ts +++ b/packages/g6/src/runtime/behavior.ts @@ -4,6 +4,7 @@ import { CommonEvent, ContainerEvent } from '../constants'; import { ExtensionController } from '../registry/extension'; import type { BehaviorOptions, CustomBehaviorOption } from '../spec/behavior'; import type { Target } from '../types'; +import { isToBeDestroyed } from '../utils/element'; import { eventTargetOf } from '../utils/event'; import type { RuntimeContext } from './types'; @@ -70,6 +71,10 @@ export class BehaviorController extends ExtensionController