new DefArrange()
The DefArrange type represents the default arrangement options for auto-arranging elements in a surface control. The defArrange field of Swimlane.Options object uses this type to define how elements should be arranged when the Arrange method is called. The Arrange method automatically positions elements based on the specified arrangement options, such as direction, spacing, alignment, and compactness. By configuring the DefArrange type, you can control the layout of elements in a surface control to achieve a more organized and visually appealing design.
Members
(static) align :object
The align property specifies the alignment of the elements relative to incoming/outgoing elements during the Arrange operation. The Arrange method automatically arranges the elements of the control based on the links between them and the options defined in the defArrange property. The align property controls how elements are aligned relative to their incoming and outgoing connections, allowing you to create a layout that is visually organized and easy to understand. By setting this property, you can choose to align elements to the left, center, or right (for horizontal arrangement) or top, middle, or bottom (for vertical arrangement) relative to their connected elements. This helps enhance the readability of your diagram or flowchart by ensuring that related elements are visually connected in a way that makes sense for your specific use case.
The align property can be set to the following values:
- 0 {number}, indicates left/top alignment
- 1 {number}, indicates center alignment
- 2 {number}, specifies right/bottom alignment
Currently, any other value has no effect. The default value is 1, which indicates center alignment.
Type:
- object
(static) compact :object
The compact property compacts the layout during the Arrange method. The Arrange method automatically arranges the elements of the control based on the links between them and the options defined in the defArrange property. The compact property controls whether to use a compact layout during the arrangement process, which can help reduce the overall size of the diagram or flowchart while still maintaining readability. When set to true, the Arrange method will attempt to minimize the space between elements while still ensuring that they are visually distinct and connected according to their links. This can be particularly useful when working with complex diagrams that have many elements and connections, as it helps to create a more efficient use of space without sacrificing clarity. Setting this property to false allows for a more spaced-out layout, while setting it to true creates a more compact arrangement. The default value is true, which indicates that the layout is compacted during the Arrange method.
Type:
- object
Example
true {boolean}, compacts the layout during the Arrange method.
false {boolean}, allows for a more spaced-out layout during the Arrange method.
compact
(static) dir :object
The dir property specifies the direction to auto-arrange the elements. The Arrange method automatically arranges the elements of the control based on the links between them and the options defined in the defArrange property. The dir property controls the direction of arrangement, allowing you to choose between horizontal and vertical layouts. Setting this property to 0 arranges the elements horizontally, while setting it to 1 arranges them vertically. This option helps you create diagrams or flowcharts that best represent the relationships between elements in a way that suits your design preferences.
The dir property can be set to the following values:
- 0 {number}, specifies horizontal arrangement, which indicates that the out-elements are arranged to the right.
- 1 {number}, specifies vertical arrangement, which indicates that the out-elements are arranged to the bottom.
Currently, any other value has no effect. The default value is 0, which indicates horizontal arrangement.
Type:
- object
Example
0 {number}, specifies horizontal arrangement, which indicates that the out-elements are arranged to the right.
1 {number}, specifies vertical arrangement, which indicates that the out-elements are arranged to the bottom.
dir
(static) dx :object
The dx property specifies the distance between two auto-arranged elements on horizontal axis. You can use the dx field to increase or decrease the distance of the arranged elements. The Arrange method automatically arranges the elements of the control based on the links between them and the options defined in the defArrange property. The dx property controls the spacing between elements on the horizontal axis, allowing you to create a layout that is visually balanced and easy to read. By adjusting this property, you can ensure that there is enough space between elements to prevent clutter while maintaining a cohesive design. Setting this property to a positive number increases the distance between elements, while setting it to a smaller number decreases the distance, giving you flexibility in how your diagram or flowchart is presented.The default value is 36, which indicates a distance of 36 pixels between two auto-arranged elements on horizontal axis.
Type:
- object
Example
36 {number}, indicates a distance of 36 pixels between two auto-arranged elements on horizontal axis.
dx
(static) dy :object
The dy property specifies the distance between two auto-arranged elements on vertical axis. You can use the dx field to increase or decrease the distance of the arranged elements. The Arrange method automatically arranges the elements of the control based on the links between them and the options defined in the defArrange property. The dy property controls the spacing between elements on the vertical axis, allowing you to create a layout that is visually balanced and easy to read. By adjusting this property, you can ensure that there is enough space between elements to prevent clutter while maintaining a cohesive design. Setting this property to a positive number increases the distance between elements, while setting it to a smaller number decreases the distance, giving you flexibility in how your diagram or flowchart is presented.The default value is 36, which indicates a distance of 36 pixels between two auto-arranged elements on vertical axis.
Type:
- object
Example
36 {number}, indicates a distance of 36 pixels between two auto-arranged elements on vertical axis.
dy