mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-22 02:47:46 +08:00
Fix:修复当思维导图距浏览器窗口左上角不为0时,小地图渲染不正确的问题
This commit is contained in:
parent
11bb519db8
commit
5d4c5703bb
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user