mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-21 03:44:05 -06:00
prettier
This commit is contained in:
parent
7413f2a479
commit
dc5602504e
@ -127,18 +127,18 @@ class DiagramPanZoom {
|
|||||||
|
|
||||||
private resetTransform() {
|
private resetTransform() {
|
||||||
this.scale = 1
|
this.scale = 1
|
||||||
|
|
||||||
// Get container and SVG dimensions
|
// Get container and SVG dimensions
|
||||||
const containerRect = this.container.getBoundingClientRect()
|
const containerRect = this.container.getBoundingClientRect()
|
||||||
const svg = this.content.querySelector("svg")!
|
const svg = this.content.querySelector("svg")!
|
||||||
const svgRect = svg.getBoundingClientRect()
|
const svgRect = svg.getBoundingClientRect()
|
||||||
|
|
||||||
// Calculate center position relative to container
|
// Calculate center position relative to container
|
||||||
this.currentPan = {
|
this.currentPan = {
|
||||||
x: (containerRect.width - svgRect.width) / 2,
|
x: (containerRect.width - svgRect.width) / 2,
|
||||||
y: (containerRect.height - svgRect.height) / 2,
|
y: (containerRect.height - svgRect.height) / 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateTransform()
|
this.updateTransform()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user