Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
fix(plugin): AutoVisible 初始化时显示不在范围内的图表
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwei committed Aug 21, 2019
1 parent 082b06a commit 364c779
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/plugins/auto-visible.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default class AutoVisible extends PluginBase {
const zoom = map.getZoom()
instance[this.in(zoom, zooms) ? 'show' : 'hide']()
}
// fix: 初始化时显示不在范围内的图表
handler()
map.on('zoomend', handler)
instance.on(EventName.DESTROY, () => {
map.off('zoomend', handler)
Expand Down

0 comments on commit 364c779

Please sign in to comment.