Skip to main content

Function: placeElementsAroundTarget()

placeElementsAroundTarget(params): Command

Command to move specified elements at the distance around target element, trying to minimize overlapping elements.

Parameters

ParameterTypeDescription

params

object

params.distance?

number

Preferred distance from the target to place elements.

Default

300

params.elements

readonly Element[]

Elements to place around the target element.

params.graph

GraphStructure

Diagram model to get graph structure for optimal placement.

params.sizeProvider

SizeProvider

Size provider for the elements.

params.target

Element

Target element around which to place elements.

Returns

Command

Defined in

diagram/commands.ts:233