Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-7471

SWF Viewer - Auto-layout for SWF

XMLWordPrintable

    • 2022 Week 26-28 (from Jun 27), 2022 Week 29-31 (from Jul 18), 2022 Week 32-34 (from Aug 8), 2022 Week 35-37 (from Aug 29), 2022 Week 38-40 (from Sept 19), 2022 Week 41-43 (from Oct 10), 2022 Week 44-46 (from Oct 31)

      Auto-layout for SWF

      Considerations

      • None goal: Not a generic layout library (lot of cost)
      • Extensible - further domain needs

      Implementation details

      • Decouple from domain / graph  (its own layout API) ?
      • At lower level as possible (lienzo) - decouple from our entire stack, errai etc
      • Computation constraints -> loop detection on tree, etc
      • Strategies (Distribution of nodes + generation of paths)
        • Orientation (vertical, horizontal)
      • Lines (points are actually inferred by the ELK)
        • Points & Endings
      • Use cases
        • Viewer
          • no updates
          • assume no locations & dimensions in model (locations inferred by using "hardcoded" dimensions for nodes)

      Other tasks related to autolayout can be delivered as part of this jira.

      • See related tickets below
      • KOGITO-7197 is out of scope of this jira

      Acceptance criteria

      The feature is implemented as per implementation details above.
      Servererless workflow editor generates nodes using a top-down centered strategy:

      • It means the graph starts with Start node in the top center.
        • If Start is not specified, the start shape will not even appear, so the diagram starts with state(s).
      • Every next (transitioned) node is shown below the previous node.
        • If there are more nodes, they are positioned from left to right and they are centered with relation to the node(s) level above.
      • The graph ends with End node in the bottom center.
        • If End is not specified, the end shape will not even appear, the diagram ends with a state(s).
      • Magnets
        • When top-down nodes aligned:
          • the source shape will use the bottom magnet
          • the target shape will use the top magnet
        • When left-right nodes aligned:
          • the source shape will use east magnet
          • the target shape will use west magnet
        • When right-left nodes aligned:
          • the source shape will use west magnet
          • the target shape will use east magnet
        • In case an state points to a previous state (so line will go bottom-up):
          • the source shape will use the top magnet
          • the target shape will use the bottom magnet
          • NOTE: In case those magnets are causing the line to overlap, we can switch to the use of east/west magnets as well
      • Lines connecting nodes do not overlap each other as well as they do not intersect the nodes.

       

              dadossan Daniel José dos Santos (Inactive)
              romartin@redhat.com Roger Martinez
              Lubomir Terifaj Lubomir Terifaj
              Lubomir Terifaj Lubomir Terifaj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: