Changes for page KLay Layered Layout Options
Last modified by Richard Kreissig on 2023/09/14 10:20
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,7 +5,3 @@ 1 -{{warning}} 2 -This is preliminary and incomplete documentation. You've been warned. 3 -{{/warning}} 4 - 5 5 KLay Layered supports a whole bunch of layout options. Every single one of them is documented here. 6 6 7 7 **Contents** ... ... @@ -29,6 +29,22 @@ 29 29 )))|=((( 30 30 Default 31 31 ))) 28 +|(% colspan="1" %)(% colspan="1" %) 29 +((( 30 +Additional Port Space 31 +)))|(% colspan="1" %)(% colspan="1" %) 32 +((( 33 +de.cau.cs.kieler.additionalPortSpace 34 +)))|(% colspan="1" %)(% colspan="1" %) 35 +((( 36 +Margins 37 +)))|(% colspan="1" %)(% colspan="1" %) 38 +((( 39 +Nodes 40 +)))|(% colspan="1" %)(% colspan="1" %) 41 +((( 42 +0, 0, 0, 0 43 +))) 32 32 |((( 33 33 Alignment 34 34 )))|((( ... ... @@ -327,6 +327,22 @@ 327 327 ((( 328 328 UNDEFINED 329 329 ))) 342 +|(% colspan="1" %)(% colspan="1" %) 343 +((( 344 +Port Spacing 345 +)))|(% colspan="1" %)(% colspan="1" %) 346 +((( 347 +de.cau.cs.kieler.portSpacing 348 +)))|(% colspan="1" %)(% colspan="1" %) 349 +((( 350 +Float 351 +)))|(% colspan="1" %)(% colspan="1" %) 352 +((( 353 +Nodes 354 +)))|(% colspan="1" %)(% colspan="1" %) 355 +((( 356 + 357 +))) 330 330 |((( 331 331 Priority 332 332 )))|((( ... ... @@ -575,6 +575,25 @@ 575 575 ))) 576 576 |(% colspan="1" %)(% colspan="1" %) 577 577 ((( 606 +[[Linear Segments Deflection Dampening>>doc:||anchor="deflectionDampening"]] 607 +)))|(% colspan="1" %)(% colspan="1" %) 608 +((( 609 +de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening 610 +)))|(% colspan="1" %)(% colspan="1" %) 611 +((( 612 +Float 613 +)))|(% colspan="1" %)(% colspan="1" %) 614 +((( 615 +Parents 616 +)))|(% colspan="1" %)(% colspan="1" %) 617 +((( 618 +0.3 619 +)))|(% colspan="1" %)(% colspan="1" %) 620 +((( 621 +nodePlace=LINEAR_SEGMENTS 622 +))) 623 +|(% colspan="1" %)(% colspan="1" %) 624 +((( 578 578 [[Maximal Iterations>>doc:||anchor="maximalIterations"]] 579 579 )))|(% colspan="1" %)(% colspan="1" %) 580 580 ((( ... ... @@ -697,10 +697,6 @@ 697 697 698 698 ))) 699 699 700 -= The Most Important Options = 701 - 702 -**TODO:** Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or something. 703 - 704 704 = Detailed Documentation = 705 705 706 706 This section explains every layout option in more detail. See [[the KIML documentation>>doc:KIML Layout Options]] for more information on KIML layout options. Those options are only mentioned here if KLay Layered adds some custom behavior. ... ... @@ -747,11 +747,18 @@ 747 747 748 748 {{id name="edgeLabelSideSelection"/}} 749 749 750 -{{warning}} 751 -Document! 752 -{{/warning}} 793 +Determines how KLay Layered places edge labels. The following strategies are available: 753 753 754 - 795 +* ALWAYS_UP 796 +Always places edge labels above the edge. 797 +* ALWAYS_DOWN 798 +Always places edge labels below the edge. 799 +* DIRECTION_UP 800 +Places edge labels above edges pointing right, and below edges pointing left. 801 +* DIRECTION_DOWN 802 +Places edge labels below edges pointing right, and above edges pointing left. 803 +* SMART 804 +Uses a heuristic that determines the best edge label placement, also taking the placement of port labels into account. 755 755 756 756 == Feedback Edges == 757 757 ... ... @@ -759,10 +759,16 @@ 759 759 760 760 {{id name="feedbackEdges"/}} 761 761 762 -{{warning}} 763 -Document! 764 -{{/warning}} 812 +Feedback edges are edges that feed the output of a node back to be the input of a previous node. This option controls how feedback edges are routed if port constraints are FREE. This influences how much emphasis is put on feedback edges. 765 765 814 +With feedback edges: 815 + 816 +[[image:attach:feedback_on.png]] 817 + 818 +Without feedback edges: 819 + 820 +[[image:attach:feedback_off.png]] 821 + 766 766 == Fixed Alignment == 767 767 768 768 ... ... @@ -792,12 +792,26 @@ 792 792 793 793 {{id name="layerConstraint"/}} 794 794 795 -{{warning}} 796 -Document! 797 -{{/warning}} 851 +The layer a node is placed in is usually computed by the layer assignment algorithms. However, sometimes certain nodes need to be placed in the first or in the last layer (for example, nodes that represent inputs from the outside). The layer constraint option can be set on such nodes to do just that. 798 798 799 - 853 +[[image:attach:layer_constraints.png]] 800 800 855 +{{note}} 856 +This option can also be set to {{code language="none"}}FIRST_SEPARATE{{/code}} and {{code language="none"}}LAST_SEPARATE{{/code}}. These are for internal use only and should not have been publicly exposed in the first place. Using them can result in layout problems. 857 +{{/note}} 858 + 859 +== Linear Segments Deflection Dampening == 860 + 861 + 862 + 863 +{{id name="deflectionDampening"/}} 864 + 865 +{{note}} 866 +This is a very advanced layout option that you normally shouldn't worry about. 867 +{{/note}} 868 + 869 +The linear segments node placer can sometimes place nodes in a way that results in unnecessarily large diagrams. This option dampens how much the nodes are moved around. A dampening factor of 1.0 disables dampening and just lets the node placer do what it wants. A more conservative dampening factor of 0.3 (the default) restricts the freedom of the node placer a bit more. 870 + 801 801 == Maximal Iterations == 802 802 803 803 ... ... @@ -822,10 +822,10 @@ 822 822 823 823 {{id name="mergeHierarchyEdges"/}} 824 824 825 -{{warning}} 826 -Document! 827 -{{/warning}} 895 +If hierarchical layout is active, this option is the hierarchical equivalent to //Merge Edges//. If set to true on a compound node, all hierarchy-crossing edges that start or end inside that compound node are eligible for merging. 828 828 897 +[[image:attach:merge_hierarchy_edges.png]] 898 + 829 829 == Node Layering == 830 830 831 831 ... ... @@ -847,10 +847,17 @@ 847 847 848 848 {{id name="nodePlacement"/}} 849 849 850 -{{warning}} 851 -Document! 852 -{{/warning}} 920 +Decides which algorithm is used to compute the y coordinate of each node. This influences the length of edges, the number of edge bends, and the height of the diagram. We have different algorithms available, with different optimization goals: 853 853 922 +* BRANDES_KOEPF 923 +Minimizes the number of edge bends at the expense of diagram size: diagrams drawn with this algorithm are usually higher than diagrams drawn with other algorithms. 924 +* LINEAR_SEGMENTS 925 +Computes a balanced placement. 926 +* BUCHHEIM_JUENGER_LEIPERT 927 +Also computes a balanced placement, but a little faster. 928 +* SIMPLE 929 +Minimizes the area at the expense of... well, pretty much everything else. 930 + 854 854 == Port Anchor Offset == 855 855 856 856 ... ... @@ -857,12 +857,12 @@ 857 857 858 858 {{id name="portAnchor"/}} 859 859 860 -{{warning}} 861 -Document! 862 -{{/warning}} 937 +Since ports have a size, we need a concrete point inside the port that edges should start or end in. In KLay Layered, this is referred to as the //port anchor//. By default, the center of each port is used as its port anchor, but this behavior can be overridden by setting an explicit port anchor. 863 863 864 - 939 +In the following example, the port anchor of the left port was moved upwards, while the port anchor of the second port was moved downwards: 865 865 941 +[[image:attach:port_anchors.png]] 942 + 866 866 == Thoroughness == 867 867 868 868
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -947 01341 +9471754 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/947 0134/KLay Layered Layout Options1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9471754/KLay Layered Layout Options