Automatic swimlane layout in mxgraph

前端 未结 2 1906
予麋鹿
予麋鹿 2021-02-07 07:05

There is swimlane example in mxgraph but it is not automatic. So I took the graphlayout example as a basis instead and made few changes:

  • Always use mxSwimlaneLayou
2条回答
  •  误落风尘
    2021-02-07 07:47

    Far from perfect, but somehow improvement:

    Demo

    I've added:

    layout.execute(lane1, [v1,v2,v3,v4]);
    layout.execute(lane2, [v5,v6,v7,v8]);
    

    and changed resizeParent to false, looks like lanes are respected but still don't look pleasant.

提交回复
热议问题