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
When gap=0, the api.fromJSON(api.toJSON()) operation is a no-op, as expected, we restore the layout exactly as it was saved.
But when gap>0, api.toJSON() operation actually changes the sizes (height, width) of elements a little bit (omitting gaps), which causes the api.fromJSON(api.toJSON()) to actually slightly change the layout. Doing this repeatedly (e.g. if the user edits and saves the layout multiple times) ends up changing the layout significantly
To Reproduce
Steps to reproduce the behavior:
have a dockview with gap=20
have a button to call api.fromJSON(api.toJSON())
click the button repeatedly
See error
Expected behavior
api.fromJSON(api.toJSON()) should be a no-op basically, not changing sizes
Describe the bug
When gap=0, the
api.fromJSON(api.toJSON())
operation is a no-op, as expected, we restore the layout exactly as it was saved.But when gap>0,
api.toJSON()
operation actually changes the sizes (height, width) of elements a little bit (omitting gaps), which causes theapi.fromJSON(api.toJSON())
to actually slightly change the layout. Doing this repeatedly (e.g. if the user edits and saves the layout multiple times) ends up changing the layout significantlyTo Reproduce
Steps to reproduce the behavior:
api.fromJSON(api.toJSON())
Expected behavior
api.fromJSON(api.toJSON())
should be a no-op basically, not changing sizesScreenshots
No issue when gap=0
https://www.loom.com/share/dec0b95292404ffbb858095918ee99df?sid=bdfe41d1-4f72-491e-93d3-9920ab826a60
Issue with gap>0
https://www.loom.com/share/e3bdd197762040eb904c61ea2eb4cb90?sid=bc202fe0-ad47-4ab7-a854-81562e0dc1a4
The text was updated successfully, but these errors were encountered: