forked from github/dataease
Merge pull request #13137 from dataease/pr@dev-v2@chart-symbolic-tooltip-fix
fix(图表): 修复符号地图提示显示错乱的问题
This commit is contained in:
commit
0f3ad8af4d
@ -330,6 +330,15 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
return resultMap
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除 popup
|
||||
* @param container
|
||||
*/
|
||||
clearPopup = container => {
|
||||
const containerElement = document.getElementById(container)
|
||||
containerElement?.querySelectorAll('.l7-popup').forEach((element: Element) => element.remove())
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建 tooltip
|
||||
* @param chart
|
||||
@ -337,6 +346,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
*/
|
||||
buildTooltip = (chart, container, pointLayer) => {
|
||||
const customAttr = chart.customAttr ? parseJson(chart.customAttr) : null
|
||||
this.clearPopup(container)
|
||||
if (customAttr?.tooltip?.show) {
|
||||
const { tooltip } = deepCopy(customAttr)
|
||||
let showFields = tooltip.showFields || []
|
||||
|
Loading…
Reference in New Issue
Block a user