Skip to content

Commit

Permalink
fix: resolve animation conflict between hover-activate and collapse-e…
Browse files Browse the repository at this point in the history
…xpand behaviors (#6070)
  • Loading branch information
yvonneyx authored Jul 22, 2024
1 parent 56e54ad commit 3ac8a02
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/g6/src/behaviors/hover-activate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,14 @@ export class HoverActivate extends BaseBehavior<HoverActivateOptions> {
};

private validate(event: IPointerEvent) {
if (this.destroyed || this.isFrozen) return false;
if (
this.destroyed ||
this.isFrozen ||
// @ts-expect-error private property
// 避免动画冲突,在combo折叠展开过程中不触发悬停事件 | To prevent animation conflicts, hover events are disabled during combo expand/collapse actions
this.context.graph.isCollapsingExpanding
)
return false;
const { enable } = this.options;
if (isFunction(enable)) return enable(event);
return !!enable;
Expand Down

0 comments on commit 3ac8a02

Please sign in to comment.