Skip to content

Fit-to-screen button uses hardcoded scale instead of computing bounds #10

@CalebisGross

Description

@CalebisGross

Problem

`internal/web/static/index.html` lines ~1565-1570: The `fitGraph()` function applies `scale(0.8)` centered on the container midpoint instead of computing the actual bounding box of all nodes.

Impact

"Fit to screen" doesn't actually fit the graph. Nodes may be off-screen after fitting.

Fix

Compute min/max x,y across all nodes, calculate proper scale and translate to fit all content with padding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions