Skip to content

ClipPathLayout

Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:13

Layout will adjust the bounding box to match the clip path bounding box.

new ClipPathLayout(): ClipPathLayout

ClipPathLayout

LayoutStrategy.constructor

readonly static type: "clip-path" = 'clip-path'

Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:14

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

LayoutStrategy.type

calcBoundingBox(objects, context): undefined | LayoutStrategyResult

Defined in: src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:68

Override this method to customize layout.

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

StrictLayoutContext

undefined | LayoutStrategyResult

LayoutStrategy.calcBoundingBox


calcLayoutResult(context, objects): undefined | LayoutStrategyResult

Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:24

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.

StrictLayoutContext

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

undefined | LayoutStrategyResult

layout result OR undefined to skip layout

LayoutStrategy.calcLayoutResult


getInitialSize(context, result): Point

Defined in: src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:58

StrictLayoutContext & CommonLayoutContext & object

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

Point

LayoutStrategy.getInitialSize


shouldLayoutClipPath(): boolean

Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:20

boolean

LayoutStrategy.shouldLayoutClipPath


shouldPerformLayout(context): boolean

Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:16

StrictLayoutContext

boolean

LayoutStrategy.shouldPerformLayout