Skip to content

Commit

Permalink
feat: support virtual render with scroller plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
OpportunityLiu committed Apr 4, 2024
1 parent 693344e commit ebf248d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/x6/src/graph/virtual-render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit ebf248d

Please sign in to comment.