Skip to main content

Class: LayoutConstraint

This class is used internally for processing layout constraints that have been defined according to the Constraints interface.

Imagine we have two nodes, A and B. B's position is set using its position property. A's position is set using the layout constraint "bottomToTopOf B." A is the focal node in this example. What this means is that A's y coordinate will be computed such that the bottom of A is the top of B. If A and B are squares, then A sits on top of B with no gap.

Constructors

new LayoutConstraint()

new LayoutConstraint(type, alterNode): LayoutConstraint

Parameters

type: ConstraintType

alterNode: M2Node

Returns

LayoutConstraint

Source

LayoutConstraint.ts:65

Properties

alterNode

alterNode: M2Node

Source

LayoutConstraint.ts:21


alterNodeMinimum

alterNodeMinimum: boolean = false

Source

LayoutConstraint.ts:40


alterNodeMinimumTypes

alterNodeMinimumTypes: ConstraintType[]

Source

LayoutConstraint.ts:58


focalNodeMinimum

focalNodeMinimum: boolean = false

Source

LayoutConstraint.ts:37


focalNodeMinimumTypes

focalNodeMinimumTypes: ConstraintType[]

Source

LayoutConstraint.ts:50


type

type: ConstraintType

Source

LayoutConstraint.ts:17


verticalConstraint

verticalConstraint: boolean = false

Source

LayoutConstraint.ts:30


verticalTypes

verticalTypes: ConstraintType[]

Source

LayoutConstraint.ts:42