mff-uk / dataspecer

https://dataspecer.com
MIT License
19 stars 7 forks source link

How is initial view position determined? #517

Open jakubklimek opened 2 months ago

jakubklimek commented 2 months ago

See this. When I open it, I see a blank canvas, because all the classes are actually more to the top - I have to scroll there.

This leads me to the question of how is the initial view configuration determined? To avoid this type of confusion, usually, the initial view is computed so that something is visible, usually the leftmost thing + some margin is in the middle, or someting like that.

apolicky commented 1 month ago

It isn't. Reactflow supports fit-to-view on load. Since we are opening the visualization from backend package asynchronously, the visualization is rendered empty and the concepts appear afterwards. There is the fit-to-view icon in the left bottom corner of reactflow though

jakubklimek commented 1 month ago

Could "fit view" be automatically triggered the initial model load then?