Skip to content

Add the new diagram layout data structure #1527

Closed
@gcoutable

Description

@gcoutable

Remove:

  • Position#UNDEFINED
  • Node#position
  • Node#size
  • Edge#routingPoints
  • Edge#sourceAnchorRelativePosition
  • Edge#targetAnchorRelativePosition
  • Label#position
  • Label#size
  • Label#alignment
  • NodeDescription#childrenLayoutStrategyProvider should be childrenLayoutStrategy (should not be dynamic)
  • Node#childrenLayoutStrategy (can be computed from description)

Add:

public record DiagramLayoutData (
  Map<String, NodeLayoutData> nodeLayoutData,
  Map<String, EdgeLayoutData> edgeLayoutData
  Map<String, LabelLayoutData> labelLayoutData
) {}

public record NodeLayoutData (
  Position position,
  Size size,
) {}

public record EdgeLayoutData (
  Ratio sourceAnchorRelativePosition,
  Ratio targetAnchorRelativePosition,
  List<Position> routingPoints
) {}

public record LabelLayoutData (
  Position position,
  Size size,
  Position alignment
) {}

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions