const drag = () => { const svg = document.querySelector('svg'); let isDragging = false; let startClientX, startClientY; let startViewBoxX, startViewBoxY; let viewport_width, viewport_height; let newX, newY; let initialScale; svg.addEventListener('mousedown', (e) => { let [x, y, width, height] = svg.getAttribute('viewBox').split(' ').map(Number); isDragging = true; startClientX = e.clientX; start..