Skip to content

FixedLayout

Layout will keep target’s initial size.

Extends

Constructors

new FixedLayout()

new FixedLayout(): FixedLayout

Returns

FixedLayout

Inherited from

LayoutStrategy.constructor

Properties

type

readonly static type: "fixed" = 'fixed'

override by subclass for persistence (TS does not support static abstract)

Overrides

LayoutStrategy.type

Defined in

src/LayoutManager/LayoutStrategies/FixedLayout.ts:14

Methods

calcBoundingBox()

calcBoundingBox(objects, context): undefined | LayoutStrategyResult

Override this method to customize layout.

Parameters

objects: FabricObject<Partial<FabricObjectProps>, SerializedObjectProps, ObjectEvents>[]

context: StrictLayoutContext

Returns

undefined | LayoutStrategyResult

Inherited from

LayoutStrategy.calcBoundingBox

Defined in

src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:68


calcLayoutResult()

calcLayoutResult(context, objects): undefined | LayoutStrategyResult

Used by the LayoutManager to perform layout @TODO/fix: if this method is calcResult, should calc unconditionally. the condition to not calc should be evaluated by the layoutManager.

Parameters

context: StrictLayoutContext

objects: FabricObject<Partial<FabricObjectProps>, SerializedObjectProps, ObjectEvents>[]

Returns

undefined | LayoutStrategyResult

layout result OR undefined to skip layout

Inherited from

LayoutStrategy.calcLayoutResult

Defined in

src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:33


getInitialSize()

getInitialSize(__namedParameters, __namedParameters): Point

respect target’s initial size

Parameters

__namedParameters: StrictLayoutContext & CommonLayoutContext & object

__namedParameters: Pick<LayoutStrategyResult, "center" | "size">

Returns

Point

Overrides

LayoutStrategy.getInitialSize

Defined in

src/LayoutManager/LayoutStrategies/FixedLayout.ts:19


shouldLayoutClipPath()

shouldLayoutClipPath(__namedParameters): undefined | boolean

Parameters

__namedParameters: StrictLayoutContext

Returns

undefined | boolean

Inherited from

LayoutStrategy.shouldLayoutClipPath

Defined in

src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:50


shouldPerformLayout()

shouldPerformLayout(__namedParameters): boolean

Parameters

__namedParameters: StrictLayoutContext

Returns

boolean

Inherited from

LayoutStrategy.shouldPerformLayout

Defined in

src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:42