From bfc40661504cffba6bac92d39e303fa1de17a892 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Mon, 1 Apr 2024 13:06:38 +0800 Subject: [PATCH] feat: support virtual render with scroller plugin --- packages/x6/src/graph/virtual-render.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/x6/src/graph/virtual-render.ts b/packages/x6/src/graph/virtual-render.ts index 0470c347fdc..ccd25acc5a7 100644 --- a/packages/x6/src/graph/virtual-render.ts +++ b/packages/x6/src/graph/virtual-render.ts @@ -3,9 +3,13 @@ import { Base } from './base' export class VirtualRenderManager extends Base { protected init() { - this.resetRenderArea = FunctionExt.throttle(this.resetRenderArea, 200, { - leading: true, - }) + this.resetRenderArea = FunctionExt.throttle( + FunctionExt.throttle(this.resetRenderArea, 200, { + leading: true, + }), + 1, + { leading: false }, + ) this.resetRenderArea() this.startListening() }