Skip to content

fix(export): preserve lines SVG viewBox on fixed-layout export - #1163

Open
ktz03 wants to merge 1 commit into
bytedance:mainfrom
ktz03:fix/export-preserve-lines-viewbox
Open

fix(export): preserve lines SVG viewBox on fixed-layout export#1163
ktz03 wants to merge 1 commit into
bytedance:mainfrom
ktz03:fix/export-preserve-lines-viewbox

Conversation

@ktz03

@ktz03 ktz03 commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Fixed-layout image export cloned the live lines layer but then overwrote the SVG viewBox with a hardcoded 0 0 1000 1000.

On canvas, FlowLinesLayer sets viewBox from the current zoom (1000 / finalScale). Forcing 1000 x 1000 during export mis-scales connection paths relative to nodes, which shows up as crooked lines in exported PNG/SVG/JPEG.

This change keeps the cloned viewBox from the live canvas.

Fixes #1146

Testing plan

  • Open a fixed-layout workflow with several connected nodes
  • Export PNG/SVG at default zoom and after zoom in/out
  • Verify connection lines stay aligned with node ports in the export
  • Sanity-check free-layout export (unchanged code path)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] When exporting, the connection lines of nodes are crooked.

1 participant