Add fullscreen button and remove initial pan animation

Add a fullscreen toggle to the zoom controls using inline Lucide SVG
icons (Maximize/X). Remove the 500ms transition on initial center so the
chart starts focused on the root person immediately.
This commit is contained in:
2026-03-16 14:45:21 +01:00
parent 58046d8dd7
commit 8a9b0f2248
4 changed files with 43 additions and 8 deletions

View File

@@ -79,12 +79,9 @@ export default class Chart {
centerOnRoot() {
const { width, height } = this.svg.node().getBoundingClientRect();
this.svg
.transition()
.duration(500)
.call(
this.zoomBehavior.transform,
zoomIdentity.translate(width / 2, height / 2)
);
this.svg.call(
this.zoomBehavior.transform,
zoomIdentity.translate(width / 2, height / 2)
);
}
}