fix: 修复地图下钻中国时countryid有可能等于private ip的问题

This commit is contained in:
chenjinsong
2021-11-18 09:09:09 +08:00
parent d7a43885ae
commit c3ab66db6a

View File

@@ -857,7 +857,8 @@ export default {
polygonTemplate.strokeWidth = 0.5 polygonTemplate.strokeWidth = 0.5
polygonTemplate.fill = am4Core.color('rgba(176,196,222,.5)') polygonTemplate.fill = am4Core.color('rgba(176,196,222,.5)')
polygonTemplate.events.on('hit', ev => { polygonTemplate.events.on('hit', ev => {
const countryId = ev.target.dataItem.dataContext.id let countryId = ev.target.dataItem.dataContext.id
countryId = countryId === 'Private IP' ? 'China' : countryId
if (countryId) { if (countryId) {
ev.target.series.chart.zoomToMapObject(ev.target) ev.target.series.chart.zoomToMapObject(ev.target)
ev.target.isHover = false ev.target.isHover = false