| | |
| | | export function getMapContainer() { |
| | | return mapContainer; |
| | | } |
| | | |
| | | export const getRealPosition = (x, y) => { |
| | | const rect = app.view.getBoundingClientRect(); |
| | | return { |
| | | mapX: (x - rect.left) / mapContainer.scale.x - mapContainer.x / mapContainer.scale.x, |
| | | mapY: (y - rect.top) / mapContainer.scale.y - mapContainer.y / mapContainer.scale.y |
| | | } |
| | | } |
| | | |
| | | |
| | | export const patchRaLayout = (param) => { |
| | | const parentElement = document.getElementById('main-content'); |
| | | if (parentElement && parentElement.classList.contains('RaLayout-content')) { |
| | | parentElement.style.paddingLeft = param; |
| | | parentElement.style.paddingRight = param; |
| | | } |
| | | } |