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
Sprotty is using CSS to style diagrams. This is very useful to interactively change some styling aspect in the diagram using the style editor in browser. Unfortunately, this stops at layout options, whcih are currently defined in as LayoutOptions in the SModel. The disadvantages of this are
tuning the node/edge layouts has very long turnarounds
the SModel blows up, which is problematic for client/server communication
to compensate we sometimes adapt the SModelFactory which adds further complexity,
we intoduced a cascading mechanism to collect the layout options by spreading them all values from the root to the current element, which may not scale well.
We should consider getting the layout options as CSS variables. We'd get
using the browser's internal and optimized capabilities for merging styles
interactive layout editing as with other styles
a better separation of concerns
a much smaller SModel.
The only problem may be that we have to listen for CSS changes in order to trigger a relayout. AFAIK we can only add change listeners to the direct CSS properties of the element. We'd maybe have to trigger the relayout manually, e.g. on a certain keystroke.
The text was updated successfully, but these errors were encountered:
Sprotty is using CSS to style diagrams. This is very useful to interactively change some styling aspect in the diagram using the style editor in browser. Unfortunately, this stops at layout options, whcih are currently defined in as
LayoutOptions
in the SModel. The disadvantages of this areSModelFactory
which adds further complexity,We should consider getting the layout options as CSS variables. We'd get
The only problem may be that we have to listen for CSS changes in order to trigger a relayout. AFAIK we can only add change listeners to the direct CSS properties of the element. We'd maybe have to trigger the relayout manually, e.g. on a certain keystroke.
The text was updated successfully, but these errors were encountered: