forked from github/dataease
Merge pull request #13142 from dataease/pr@dev-v2@fix_online_map_tab_render
fix(图表): 修复在线地图在 Tab 组件中非第一个 Tab 页无法显示
This commit is contained in:
commit
680c3419cd
@ -79,6 +79,11 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
||||
|
||||
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
||||
const { chart, container } = drawOption
|
||||
const containerDom = document.getElementById(container)
|
||||
const rect = containerDom?.getBoundingClientRect()
|
||||
if (rect?.height <= 0) {
|
||||
return new L7Wrapper(drawOption.chartObj?.getScene(), [])
|
||||
}
|
||||
const xAxis = deepCopy(chart.xAxis)
|
||||
const xAxisExt = deepCopy(chart.xAxisExt)
|
||||
const { basicStyle, misc } = deepCopy(parseJson(chart.customAttr))
|
||||
|
@ -56,6 +56,11 @@ export class HeatMap extends L7ChartView<Scene, L7Config> {
|
||||
|
||||
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
||||
const { chart, container } = drawOption
|
||||
const containerDom = document.getElementById(container)
|
||||
const rect = containerDom?.getBoundingClientRect()
|
||||
if (rect?.height <= 0) {
|
||||
return new L7Wrapper(drawOption.chartObj?.getScene(), [])
|
||||
}
|
||||
const xAxis = deepCopy(chart.xAxis)
|
||||
const yAxis = deepCopy(chart.yAxis)
|
||||
let basicStyle: DeepPartial<ChartBasicStyle>
|
||||
|
@ -81,6 +81,11 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
||||
|
||||
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
||||
const { chart, container, action } = drawOption
|
||||
const containerDom = document.getElementById(container)
|
||||
const rect = containerDom?.getBoundingClientRect()
|
||||
if (rect?.height <= 0) {
|
||||
return new L7Wrapper(drawOption.chartObj?.getScene(), [])
|
||||
}
|
||||
const xAxis = deepCopy(chart.xAxis)
|
||||
let basicStyle
|
||||
let miscStyle
|
||||
|
Loading…
Reference in New Issue
Block a user