# Node Size Options

Property | Value
--- | ---
Identifier: | `org.eclipse.elk.nodeSize.options`
Meta Data Provider: | `core.options.CoreOptions`
Value Type: | `java.util.EnumSet<org.eclipse.elk.core.options.SizeOptions>`
Possible Values: | `DEFAULT_MINIMUM_SIZE` `MINIMUM_SIZE_ACCOUNTS_FOR_PADDING` `COMPUTE_PADDING` `OUTSIDE_NODE_LABELS_OVERHANG` `PORTS_OVERHANG` `UNIFORM_PORT_SPACING` `SPACE_EFFICIENT_PORT_LABELS` `FORCE_TABULAR_NODE_LABELS` `ASYMMETRICAL`
Default Value: | `EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE)` (as defined in `org.eclipse.elk`)
Applies To: | nodes
Containing Group: | nodeSize

### Description

Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.

## Additional Documentation

Size constraints basically restrict the freedom a layout algorithm has in resizing a node subject to its node labels, ports, and port labels. The different values have the following meanings:

Constraint | Meaning
--- | ---
`DEFAULT_MINIMUM_SIZE` | Uses a default minimum size if none is specified and size constraints include `MINIMUM_SIZE`.
`MINIMUM_SIZE_ACCOUNTS_FOR_PADDING` | If this option is set and paddings are computed by the algorithm, the minimum size plus the computed padding are a lower bound on the node size. If this option is not set, the minimum size will be applied to the node’s whole size regardless of any computed padding. Note that, depending on the algorithm, this option may only apply to non-hierarchical nodes. This option only makes sense if size constraints include `MINIMUM_SIZE`.
`COMPUTE_PADDING` | With this option set, the padding of nodes will be computed and returned as part of the algorithm’s result. If port labels or node labels are placed, they may influence the size of the padding. Note that, depending on the algorithm, this option may only apply to non-hierarchical nodes. This option is independent of the size constraint set on a node.
`OUTSIDE_NODE_LABELS_OVERHANG` | If node labels influence the node size, but outside node labels are allowed to overhang, only inside node labels actually influence node size.
`PORTS_OVERHANG` | By default, ports only use the space available to them, even if that means violating port spacing settings. If this option is active, port spacings are adhered to, even if that means ports extend beyond node boundaries.
`UNIFORM_PORT_SPACING` | If port labels are taken into consideration, differently sized labels can result in a different amount of space between different pairs of ports. This option causes all ports to be evenly spaced by enlarging the space between every pair of ports to the larges amount of space between any pair of ports.
`SPACE_EFFICIENT_PORT_LABELS` | Unless there are exactly two ports at a given port side, outside port labels are usually all placed to the same side of their port. For example, if there are three northern ports, all of their labels will be placed to the right of their ports. If this option is active, the leftmost label will be placed to the left of its port while the others stay on the right side (and similar for the other port sides). This allows the node to be smaller because the node size doesn’t have to accommodate as many port labels, but it breaks symmetry.
`FORCE_TABULAR_NODE_LABELS` | By default, inside node labels will be laid out in three rows of three cells, with no relation between the width of cells in different rows. If this option is enabled, the cells will be treated as cells of a table, with equal columns across all rows. This usually results in larger nodes.
`ASYMMETRICAL` | If this option is set, the node sizing and label placement code will not make an attempt to achieve a symmetrical layout. With this option inactive, for example, the space reserved for left inside port labels will be the same as for right inside port labels, which would not be the case otherwise. Deactivating this option will also ensure that center node labels will actually be placed in the center.

### Examples

What follows are examples of some of the size options. Each example shows two nodes: the left has the respective option disabled, the right has it enabled.

#### `MINIMUM_SIZE_ACCOUNTS_FOR_PADDING`

In this example, the darker area is the node’s client area which remains once paddings are subtracted from the node’s size.

#### `OUTSIDE_NODE_LABELS_OVERHANG`

#### `PORTS_OVERHANG`

#### `UNIFORM_PORT_SPACING`

#### `SPACE_EFFICIENT_PORT_LABELS`

#### `FORCE_TABULAR_NODE_LABELS`

#### `ASYMMETRICAL`

- Algorithms
- Box Layout
- Circo
- Dot
- Draw2D Layout
- ELK DisCo
- ELK Force
- ELK Layered
- ELK Mr. Tree
- ELK Radial
- ELK SPOrE Compaction
- ELK SPOrE Overlap Removal
- ELK Stress
- FDP
- Fixed Layout
- Neato
- Randomizer
- Rectangle Packing
- Twopi
- Layout Options
- Activate Inside Self Loops
- Adapt Port Positions
- Add Unnecessary Bendpoints
- Additional Port Space
- Additional Wrapped Edges Spacing
- Alignment
- Animate
- Animation Time Factor
- Annulus Wedge Criteria
- Aspect Ratio
- BK Edge Straightening
- BK Fixed Alignment
- Bend Points
- Box Layout Mode
- Comment Box
- Compact Rows
- Compaction
- Compaction Step Size
- Compaction Strategy
- Components Spacing
- Concentrate Edges
- Connected Components Compaction
- Connected Components Compaction Strategy
- Connected Components Layout Algorithm
- Content Alignment
- Correction Factor for Wrapping
- Cost Function for Spanning Tree
- Crossing Minimization Strategy
- Current position of a node in the order of nodes
- Cutting Strategy
- Cycle Breaking Strategy
- DCGraph
- Debug Mode
- Desired Edge Length
- Desired index of node
- Direction
- Direction Congruency
- Direction Priority
- Distance Model
- Distance Penalty When Improving Cuts
- Eades Repulsion
- Edge Center Label Placement Strategy
- Edge Edge Between Layer Spacing
- Edge Label Placement
- Edge Label Side Selection
- Edge Label Spacing
- Edge Node Between Layers Spacing
- Edge Node Spacing
- Edge Routing
- Edge Spacing
- Edge Thickness
- Edge Type
- Epsilon
- Expand Nodes
- FR Temperature
- Favor Straight Edges Over Balancing
- Feedback Edges
- Fill Polyominoes
- Fit Aspect Ratio
- Fixed Graph Size
- Fixed Position
- Font Name
- Font Size
- Force Model
- Graph Wrapping Strategy
- Greedy Switch Activation Threshold
- Greedy Switch Crossing Minimization
- Hierarchical Sweepiness
- Hierarchy Handling
- Hierarchy Handling (Dot)
- High Degree Node Maximum Tree Height
- High Degree Node Threshold
- High Degree Node Treatment
- Hypernode
- Improve Cuts
- Improve Wrapped Edges
- Individual Spacing Override
- Individual Spacing Override (ELK Layered)
- Inline Edge Labels
- Inside Self Loop
- Interactive
- Interactive Reference Point
- Iteration Limit
- Iterations
- Iterations Factor
- Junction Points
- Label Angle
- Label Distance
- Label Manager
- Label Manager
- Label Node Spacing
- Label Port Spacing
- Label Spacing
- Layer Bound
- Layer Choice Constraint
- Layer Constraint
- Layer ID
- Layer Spacing Factor
- Layout Algorithm
- Layout Ancestors
- Layout Dimension
- Layout Partition
- Layout Partitioning
- Linear Segments Deflection Dampening
- List of Polyominoes
- MSD Freedom
- Manually Specified Cuts
- Margins
- Max Node Promotion Iterations
- Max. Iterations
- Maximal Animation Time
- Merge Edges
- Merge Hierarchy-Crossing Edges
- Minimal Animation Time
- No Layout
- Node Flexibility
- Node Flexibility Default
- Node Label Padding
- Node Label Placement
- Node Layering Strategy
- Node Node Between Layers Spacing
- Node Placement Strategy
- Node Promotion Strategy
- Node Self Loop Spacing
- Node Size Constraints
- Node Size Minimum
- Node Size Options
- Node Spacing
- North or South Port
- Only Area Approximation
- Optimization Goal
- Order ID
- Orthogonal Compaction
- Overlap Removal
- Padding
- Polyomino Primary Sorting Criterion
- Polyomino Secondary Sorting Criterion
- Polyomino Traversal Strategy
- Port Alignment
- Port Alignment (East)
- Port Alignment (North)
- Port Alignment (South)
- Port Alignment (West)
- Port Anchor Offset
- Port Border Offset
- Port Constraints
- Port Index
- Port Label Placement
- Port Labels Next to Port
- Port Side
- Port Sorting Strategy
- Port Spacing
- Position
- Position Choice Constraint
- Position ID
- Post Compaction Constraint Calculation
- Post Compaction Strategy
- Priority
- Priority (Box Layout)
- Priority (ELK Force)
- Priority (ELK Layered)
- Priority (ELK Mr. Tree)
- Progress Bar
- Radius
- Randomization Seed
- Repulsive Power
- Resolved Layout Algorithm
- Root node for spanning tree construction
- Root selection for spanning tree
- Scale Factor
- Search Order
- Self-Loop Distribution
- Self-Loop Ordering
- Semi-Interactive Crossing Minimization
- Separate Connected Components
- Shift Last Placed.
- Shortness Priority
- Shortness Priority (ELK Layered)
- Sloped Edge Zone Width
- Sloppy Spline Layer Spacing Factor
- Sorter
- Spline Routing Mode
- Straightness Priority
- Stress Epsilon
- Structure Extraction Strategy
- Thoroughness
- Translation Optimization
- Treat Port Labels as Group
- Tree Construction Strategy
- Underlying Layout Algorithm
- Upper Bound On Width [MinWidth Layerer]
- Upper Layer Estimation Scaling Factor [MinWidth Layerer]
- Upper limit for iterations of overlap removal
- Valid Indices for Wrapping
- Validate Graph
- Validate Options
- Validification Strategy
- Weighting of Nodes
- Whether to run a supplementary scanline overlap check.
- Wide Nodes on Multiple Layers
- Zoom to Fit
- interactive Layout
- Layout Option Groups
- box
- compaction
- compaction
- compaction.postCompaction
- componentCompaction
- crossingMinimization
- crossingMinimization.greedySwitch
- cycleBreaking
- debug
- edge
- edgeLabels
- edgeLabels
- edgeRouting
- edgeRouting.polyline
- edgeRouting.splines
- edgeRouting.splines.sloppy
- font
- highDegreeNodes
- insideSelfLoops
- layering
- layering.coffmanGraham
- layering.minWidth
- layering.nodePromotion
- nodeLabels
- nodePlacement
- nodePlacement.bk
- nodePlacement.linearSegments
- nodePlacement.networkSimplex
- nodePlacement.networkSimplex.nodeFlexibility
- nodeSize
- overlapRemoval
- partitioning
- polyomino
- port
- portAlignment
- portLabels
- priority
- processingOrder
- spacing
- spacing
- structure
- wrapping
- wrapping.cutting
- wrapping.cutting.msd
- wrapping.multiEdge
- wrapping.singleEdge
- wrapping.validify