JacobeanRnD / SCHVIZ

SCXML Visualization
Apache License 2.0
6 stars 1 forks source link

Improve automated layout #33

Closed jbeard4 closed 9 years ago

jbeard4 commented 9 years ago

It seems a lot of our layouts result in a stacked pattern like this:

Vertical Stack: screenshot 2014-12-18 23 40 57

screenshot 2014-12-18 23 40 44

screenshot 2014-12-18 23 40 38

Horizontal Stack: screenshot 2014-12-18 23 40 50

screenshot 2014-12-18 23 40 03

With some small manual tweaking, we can get this kind of a pattern: screenshot 2014-12-18 23 37 42

I think this is more aesthetically pleasing because overlapping transitions and transition labels are minimized. We should think about how to optimize edge routing to minimize edge routing.

I have a couple of ideas about how to improve this:

  1. Apply KIELer layout to states, but not transitions. Lay out transitions according to an alternate
  2. Use KIELer for edge routing
  3. Apply KIELer layout without automated force layout applied.

Let's discuss tomorrow.

mgax commented 9 years ago

We could apply kieler layout to a derived graph: we transform each real transition into a pseudo-node (as big as the label) plus a pair of pseudo-transitions. We then ignore kieler output for transitions, but the positioning of the pseudo-node gives us a reasonable position for the label.