Untitled
const wrapperRect = e.currentTarget.getBoundingClientRect(); const x = e.clientX - wrapperRect.left; const y = e.clientY - wrapperRect.top; const zoomLevel = 1.5; const newPanX = (x - wrapperRect.width / 2) * zoomLevel; const newPanY = (y - wrapperRect.height / 2) * zoomLevel;