ClipPathLayout
Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:13
Layout will adjust the bounding box to match the clip path bounding box.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ClipPathLayout():
ClipPathLayout
Returns
Section titled “Returns”ClipPathLayout
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”
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
)
Overrides
Section titled “Overrides”Methods
Section titled “Methods”calcBoundingBox()
Section titled “calcBoundingBox()”calcBoundingBox(
objects
,context
):undefined
|LayoutStrategyResult
Defined in: src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:68
Override this method to customize layout.
Parameters
Section titled “Parameters”objects
Section titled “objects”FabricObject
<Partial
<FabricObjectProps
>, SerializedObjectProps
, ObjectEvents
>[]
context
Section titled “context”Returns
Section titled “Returns”undefined
| LayoutStrategyResult
Inherited from
Section titled “Inherited from”LayoutStrategy
.calcBoundingBox
calcLayoutResult()
Section titled “calcLayoutResult()”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.
Parameters
Section titled “Parameters”context
Section titled “context”objects
Section titled “objects”FabricObject
<Partial
<FabricObjectProps
>, SerializedObjectProps
, ObjectEvents
>[]
Returns
Section titled “Returns”undefined
| LayoutStrategyResult
layout result OR undefined
to skip layout
Overrides
Section titled “Overrides”LayoutStrategy
.calcLayoutResult
getInitialSize()
Section titled “getInitialSize()”getInitialSize(
context
,result
):Point
Defined in: src/LayoutManager/LayoutStrategies/LayoutStrategy.ts:58
Parameters
Section titled “Parameters”context
Section titled “context”StrictLayoutContext
& CommonLayoutContext
& object
result
Section titled “result”Pick
<LayoutStrategyResult
, "center"
| "size"
>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”shouldLayoutClipPath()
Section titled “shouldLayoutClipPath()”shouldLayoutClipPath():
boolean
Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:20
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”LayoutStrategy
.shouldLayoutClipPath
shouldPerformLayout()
Section titled “shouldPerformLayout()”shouldPerformLayout(
context
):boolean
Defined in: src/LayoutManager/LayoutStrategies/ClipPathLayout.ts:16
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”boolean