#
luxiaotao1123
2024-03-02 0773d66c559f2d648b62ed8f7db80c7ffc47ce1c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
 
 
let app = null;
let mapContainer = null;
 
export function syncApp(param) {
    app = param;
}
 
export function syncMapContainer(param) {
    mapContainer = param;
}
 
export const getRealPosition = (x, y) => {
    const rect = app.view.getBoundingClientRect();
    return {
        mapX: x - rect.left,
        mapY: y - rect.top
    }
}