Merge pull request #9052 from dataease/pr@dev-v2@fix_map_suspension

fix(图表): 修复地图关闭悬浮后未隐藏缩放按钮
This commit is contained in:
wisonic-s 2024-04-11 10:37:16 +08:00 committed by GitHub
commit dc890dda31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,8 +21,7 @@ import {
LIST_CLASS
} from '@antv/l7plot-component/dist/esm/legend/category/constants'
import substitute from '@antv/util/esm/substitute'
import { Plot as L7Plot } from '@antv/l7plot/dist/esm/core/plot'
import type { PlotOptions } from '@antv/l7plot/dist/esm/types'
import type { Plot as L7Plot, PlotOptions } from '@antv/l7plot/dist/esm'
import { Zoom } from '@antv/l7'
import { createL7Icon } from '@antv/l7-component/es/utils/icon'
import { DOM } from '@antv/l7-utils'
@ -855,6 +854,10 @@ class CustomZoom extends Zoom {
}
}
export function configL7Zoom(plot: L7Plot<PlotOptions>) {
const options = plot.options
if (options.zoom === false) {
return
}
plot.once('loaded', () => {
const zoomOptions = {
initZoom: plot.scene.getZoom(),