Skip to content

Commit

Permalink
style: 简化事件监听的表达
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangeSuger authored and boyongjiong committed Nov 24, 2024
1 parent 2dbce7a commit 3106d2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/extension/src/components/mini-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class MiniMap {
this.elementAreaBounds = boundsInit
this.viewPortBounds = boundsInit
this.initMiniMap()
lf.graphModel.eventCenter.on('graph:resize', this.onGraphResize)
lf.on('graph:resize', this.onGraphResize)
}

onGraphResize = () => {
Expand Down Expand Up @@ -670,7 +670,7 @@ export class MiniMap {
})
}
destroy() {
this.lf.graphModel.eventCenter.off('graph:resize', this.onGraphResize)
this.lf.off('graph:resize', this.onGraphResize)
}
}

Expand Down

0 comments on commit 3106d2f

Please sign in to comment.