Closed ZJvandeWeg closed 5 months ago
Started to dig into this, thinking it would be straight forward, little more complicated as:
Offset all x/y values at render
:
Just applying a fixed SVG transform:
translate()
. The translate()
is dependent on each flow though, not the full collection which is where the zoom
logic livesThe second option is definitely the way forward, just need to shuffle around some of the zoom logic to make pieces more easily accessible.
I have this working locally - will be pushing soon
I scan the flow for min/max/x/y, compute distances, factor in the scale, then set the div scroll positions.
working very well.
i also save state so switching tabs doesnt keep losing your position.
demo video in the PR: https://github.com/FlowFuse/flow-renderer/pull/29#issue-2272296060
Description
When my flow starts say 150 pixels down, and 300 pixels to the right, the top left part of the SVG / canvas has an open space which is slightly awkward. It would be great of the view would shift the thing down.
Epic/Story
No response