documentationfor yFiles for HTML 3.0.0.3

PortPlacementPolicy

Defines how a layout algorithm should place ports.

Remarks

This policy only has an effect on layout algorithms that support EdgePortCandidates or NodePortCandidates, which are used to enforce this policy. Layout algorithms that do not may produce edge routes that violate this policy. Also, if nodes/edges already have manually specified PortCandidates, they override this policy.

Examples

Used with LayoutExecutor's portPlacementPolicies.
Prefer the current port locations
const layout = new HierarchicalLayout()
await new LayoutExecutor({
  graphComponent: graphComponent,
  layout: layout,
  portPlacementPolicies: PortPlacementPolicy.KEEP_SIDE,
}).start()

Type Details

yFiles module
view-layout-bridge

Constants

Static Methods