eclipse-sprotty / sprotty-server

Server implementation for the Sprotty diagramming framework
https://eclipse.org/sprotty
Eclipse Public License 2.0
23 stars 19 forks source link

Rethink client-only layout scenario #55

Open spoenemann opened 5 years ago

spoenemann commented 5 years ago

When the client requests a model with client-side layout, but no server-side layout, the server responds with a RequestBoundsAction. The client never replies to that second request, but generates a SetBoundsAction locally:

https://github.com/eclipse/sprotty/blob/d039fe732581f7626da34852160b038f06f21b38/src/model-source/diagram-server.ts#L184-L198

This is a bit strange. The server should send a SetModelAction instead, and the client should take care of the RequestBounds / ComputedBounds cycle locally.