Skip to main content

Interface: Constraints

Constraints for defining relative layouts.

Remarks​

FOR INTERNAL USE ONLY

Indexable​

[key: string]: M2Node | string | number | undefined

Properties​

bottomToBottomOf?​

optional bottomToBottomOf: string | M2Node

Constrain the bottom (vertical axis) of this node to the bottom of the specified node. The bottoms of both will appear at the same vertical location

Defined in​

m2c2kit/packages/core/src/Constraints.ts:16


bottomToTopOf?​

optional bottomToTopOf: string | M2Node

Constrain the bottom (vertical axis) of this node to the top of the specified node. This node will appear immediately above of the specified node

Defined in​

m2c2kit/packages/core/src/Constraints.ts:14


endToEndOf?​

optional endToEndOf: string | M2Node

Constrain the end (horizontal axis) of this node to the end of the specified node. The end of both will appear at the same horizontal location

Defined in​

m2c2kit/packages/core/src/Constraints.ts:22


endToStartOf?​

optional endToStartOf: string | M2Node

Constrain the end (horizontal axis) of this node to the start of the specified node. This node will appear immediately to the left of the specified node

Defined in​

m2c2kit/packages/core/src/Constraints.ts:24


horizontalBias?​

optional horizontalBias: number

When opposing horizontal constraints are applied, the default is to center the node within the constraints (horizontalBias = .5). Setting horizontalBias less than .5 will pull the node towards the start (to the left). Setting horizontalBias greater than .5 will pull the node towards the end (to the right)

Defined in​

m2c2kit/packages/core/src/Constraints.ts:26


startToEndOf?​

optional startToEndOf: string | M2Node

Constrain the start (horizontal axis) of this node to the end of the specified node. This node will appear immediately to the right of the specified node

Defined in​

m2c2kit/packages/core/src/Constraints.ts:20


startToStartOf?​

optional startToStartOf: string | M2Node

Constrain the start (horizontal axis) of this node to the start of the specified node. The start of both will appear at the same horizontal location

Defined in​

m2c2kit/packages/core/src/Constraints.ts:18


topToBottomOf?​

optional topToBottomOf: string | M2Node

Constrain the top (vertical axis) of this node to the bottom of the specified node. This node will appear immediately below the specified node

Defined in​

m2c2kit/packages/core/src/Constraints.ts:12


topToTopOf?​

optional topToTopOf: string | M2Node

Constrain the top (vertical axis) of this node to the top of the specified node. The tops of both will appear at the same vertical location

Defined in​

m2c2kit/packages/core/src/Constraints.ts:10


verticalBias?​

optional verticalBias: number

When opposing vertical constraints are applied, the default is to center the node within the constraints (verticalBias = .5). Setting verticalBias less than .5 will pull the node towards the top. Setting verticalBias greater than .5 will pull the node towards the bottom

Defined in​

m2c2kit/packages/core/src/Constraints.ts:28