Fix:修复当思维导图距浏览器窗口左上角不为0时,小地图渲染不正确的问题

This commit is contained in:
wanglin2 2023-08-03 17:04:41 +08:00
parent 11bb519db8
commit 5d4c5703bb

View File

@ -25,6 +25,11 @@ class MiniMap {
let { svg, rect, origWidth, origHeight, scaleX, scaleY } =
this.mindMap.getSvgData()
// 计算数据
const elRect = this.mindMap.elRect
rect.x -= elRect.left
rect.x2 -= elRect.left
rect.y -= elRect.top
rect.y2 -= elRect.top
let boxRatio = boxWidth / boxHeight
let actWidth = 0
let actHeight = 0