Skip to content

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

Closed

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.

Activity

  1. CalebisGross commented on Mar 10, 2026

    @CalebisGross
    CollaboratorAuthor

    Fixed in #42 — fitGraph() now computes actual node bounding box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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