This commit is contained in:
vazome 2025-06-19 11:21:24 +04:00
parent 7413f2a479
commit dc5602504e
No known key found for this signature in database

View File

@ -127,18 +127,18 @@ class DiagramPanZoom {
private resetTransform() {
this.scale = 1
// Get container and SVG dimensions
const containerRect = this.container.getBoundingClientRect()
const svg = this.content.querySelector("svg")!
const svgRect = svg.getBoundingClientRect()
// Calculate center position relative to container
this.currentPan = {
x: (containerRect.width - svgRect.width) / 2,
y: (containerRect.height - svgRect.height) / 2,
}
this.updateTransform()
}
}