You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(erd): cap PNG export size, make SVG export look like the screen #1153
PNG export has no size cap (erd_view.dart:152): the whole canvas is rendered at pixelRatio: 2. A schema of 150–200 tables gives a canvas of several thousand px per side, i.e. an image over 10 000 px per side; this can exhaust memory or exceed the GPU texture limit.
SVG does not look like the screen (erd_export.dart): positions and routes match, but there are no crow's foot / bar end markers, no rounded corners, PK / FK are [PK] text instead of icons, the header has no tint, and long types run past the card edge (no clipping).
Scope
PNG: pick pixelRatio so that the longest side is at most 8192 px (fall back to 1 or below); if even that is too big, say so and offer SVG.
SVG: the same markers (crow's foot at the FK end, bar at the referenced end), rounded corners (same roundedPath geometry), header tint, PK / FK glyphs, types clipped to the card (clipPath or truncation with …).
The relation <title> stays.
Acceptance
Unit test: the PNG ratio for a 20 000 × 9 000 canvas keeps the longest side ≤ 8192.
Golden-style test on the SVG string: markers present for every relation, no text wider than its card.
Problem
erd_view.dart:152): the whole canvas is rendered atpixelRatio: 2. A schema of 150–200 tables gives a canvas of several thousand px per side, i.e. an image over 10 000 px per side; this can exhaust memory or exceed the GPU texture limit.erd_export.dart): positions and routes match, but there are no crow's foot / bar end markers, no rounded corners, PK / FK are[PK]text instead of icons, the header has no tint, and long types run past the card edge (no clipping).Scope
pixelRatioso that the longest side is at most 8192 px (fall back to 1 or below); if even that is too big, say so and offer SVG.roundedPathgeometry), header tint, PK / FK glyphs, types clipped to the card (clipPathor truncation with…).<title>stays.Acceptance