Skip to content

ActiveSelectionOptions

Extends

Properties

absolutePositioned

absolutePositioned: boolean

Meaningful ONLY when the object is used as clipPath. if true, the clipPath will have its top and left relative to canvas, and will not be influenced by the object transform. This will make the clipPath relative to the canvas, but clipping just a particular object. WARNING this is beta, this feature may change or be renamed. since 2.4.0

Default

false

Inherited from

GroupProps.absolutePositioned

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:72


angle

angle: TDegree

Angle of rotation of an object (in degrees)

Default

0

Inherited from

GroupProps.angle

Defined in

src/shapes/Object/types/BaseProps.ts:57


backgroundColor

backgroundColor: string

Background color of an object. takes css colors https://www.w3.org/TR/css-color-3/

Default

Inherited from

GroupProps.backgroundColor

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:26


borderColor

borderColor: string

Color of controlling borders of an object (when it’s active)

Default

rgb(178,204,255)

Inherited from

GroupProps.borderColor

Defined in

src/shapes/Object/types/BorderProps.ts:7


borderDashArray

borderDashArray: null | number[]

Array specifying dash pattern of an object’s borders (hasBorder must be true)

Since

1.6.2

Inherited from

GroupProps.borderDashArray

Defined in

src/shapes/Object/types/BorderProps.ts:15


borderOpacityWhenMoving

borderOpacityWhenMoving: number

Opacity of object’s controlling borders when object is active and moving

Default

0.4

Inherited from

GroupProps.borderOpacityWhenMoving

Defined in

src/shapes/Object/types/BorderProps.ts:29


borderScaleFactor

borderScaleFactor: number

Scale factor of object’s controlling borders bigger number will make a thicker border border is 1, so this is basically a border thickness since there is no way to change the border itself.

Default

1

Inherited from

GroupProps.borderScaleFactor

Defined in

src/shapes/Object/types/BorderProps.ts:39


canvas?

optional canvas: Canvas | StaticCanvas<StaticCanvasEvents>

Inherited from

GroupProps.canvas

Defined in

src/shapes/Object/types/ObjectProps.ts:20


centeredRotation

centeredRotation: boolean

When true the object will rotate on its center. When false will rotate around the origin point defined by originX and originY. The value of this property is IGNORED during a transform if the canvas has already centeredRotation set to true The object method rotate will always consider this property and never the canvas’s one.

Since

1.3.4

Default

Inherited from

GroupProps.centeredRotation

Defined in

src/shapes/Object/types/ObjectTransformProps.ts:27


centeredScaling

centeredScaling: boolean

When true, this object will use center point as the origin of transformation when being scaled via the controls.

Since

1.3.4

Default

Inherited from

GroupProps.centeredScaling

Defined in

src/shapes/Object/types/ObjectTransformProps.ts:36


clipPath?

optional clipPath: BaseFabricObject<Partial<ObjectProps>, SerializedObjectProps, ObjectEvents>

a fabricObject that, without stroke define a clipping area with their shape. filled in black the clipPath object gets used when the object has rendered, and the context is placed in the center of the object cacheCanvas. If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to ‘center’

Inherited from

GroupProps.clipPath

Defined in

src/shapes/Object/types/ObjectProps.ts:16


cornerColor

cornerColor: string

Color of controlling corners of an object (when it’s active)

Default

rgb(178,204,255)

Inherited from

GroupProps.cornerColor

Defined in

src/shapes/Object/types/ControlProps.ts:28


cornerDashArray

cornerDashArray: null | number[]

Array specifying dash pattern of an object’s control (hasBorder must be true)

Since

1.6.2

Default

null

Inherited from

GroupProps.cornerDashArray

Defined in

src/shapes/Object/types/ControlProps.ts:55


cornerSize

cornerSize: number

Size of object’s controlling corners (in pixels)

Default

13

Inherited from

GroupProps.cornerSize

Defined in

src/shapes/Object/types/ControlProps.ts:7


cornerStrokeColor

cornerStrokeColor: string

Color of controlling corners of an object (when it’s active and transparentCorners false)

Since

1.6.2

Default

''

Inherited from

GroupProps.cornerStrokeColor

Defined in

src/shapes/Object/types/ControlProps.ts:36


cornerStyle

cornerStyle: "circle" | "rect"

Specify style of control, ‘rect’ or ‘circle’ This is deprecated. In the future there will be a standard control render And you can swap it with one of the alternative proposed with the control api

Since

1.6.2

Default

'rect'

Inherited from

GroupProps.cornerStyle

Defined in

src/shapes/Object/types/ControlProps.ts:47


evented

evented: boolean

When set to false, an object can not be a target of events. All events propagate through it. Introduced in v1.3.4

Default

Inherited from

GroupProps.evented

Defined in

src/shapes/Object/types/FabricObjectProps.ts:65


excludeFromExport

excludeFromExport: boolean

When true, object is not exported in OBJECT/JSON

Since

1.6.3

Default

Inherited from

GroupProps.excludeFromExport

Defined in

src/shapes/Object/types/ObjectProps.ts:52


fill

fill: null | string | TFiller

Color of object’s fill takes css colors https://www.w3.org/TR/css-color-3/

Default

rgb(0,0,0)

Inherited from

GroupProps.fill

Defined in

src/shapes/Object/types/ObjectProps.ts:17


fillRule

fillRule: CanvasFillRule

Fill rule used to fill an object accepted values are nonzero, evenodd Backwards incompatibility note: This property was used for setting globalCompositeOperation until v1.4.12 (use globalCompositeOperation instead)

Default

nonzero

Inherited from

GroupProps.fillRule

Defined in

src/shapes/Object/types/FillStrokeProps.ts:26


flipX

flipX: boolean

When true, an object is rendered as flipped horizontally

Default

false

Inherited from

GroupProps.flipX

Defined in

src/shapes/Object/types/BaseProps.ts:64


flipY

flipY: boolean

When true, an object is rendered as flipped vertically

Default

false

Inherited from

GroupProps.flipY

Defined in

src/shapes/Object/types/BaseProps.ts:71


globalCompositeOperation

globalCompositeOperation: GlobalCompositeOperation

Composite rule used for canvas globalCompositeOperation

Default

Inherited from

GroupProps.globalCompositeOperation

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:18


hasBorders

hasBorders: boolean

When set to false, object’s controlling borders are not rendered

Default

Inherited from

GroupProps.hasBorders

Defined in

src/shapes/Object/types/BorderProps.ts:22


hasControls

hasControls: boolean

When set to false, object’s controls are not displayed and can not be used to manipulate object

Default

true

Inherited from

GroupProps.hasControls

Defined in

src/shapes/Object/types/ControlProps.ts:69


height

height: number

Object height

Default

Inherited from

GroupProps.height

Defined in

src/shapes/Object/types/BaseProps.ts:34


hoverCursor

hoverCursor: null | string

Default cursor value used when hovering over this object on canvas

Default

null

Inherited from

GroupProps.hoverCursor

Defined in

src/shapes/Object/types/FabricObjectProps.ts:27


includeDefaultValues

includeDefaultValues: boolean

When false, default object’s values are not included in its serialization

Default

Inherited from

GroupProps.includeDefaultValues

Defined in

src/shapes/Object/types/ObjectProps.ts:44


interactive

interactive: boolean

Inherited from

GroupProps.interactive

Defined in

src/shapes/Group.ts:56


inverted

inverted: boolean

Meaningful ONLY when the object is used as clipPath. if true, the clipPath will make the object clip to the outside of the clipPath since 2.4.0

Default

false

Inherited from

GroupProps.inverted

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:60


layoutManager

layoutManager: LayoutManager

Inherited from

GroupProps.layoutManager

Defined in

src/shapes/Group.ts:67


left

left: number

Left position of an object. Note that by default it’s relative to object left. You can change this by setting originX

Default

0

Inherited from

GroupProps.left

Defined in

src/shapes/Object/types/BaseProps.ts:11


lockMovementX

lockMovementX: boolean

When true, object horizontal movement is locked

Default

Inherited from

GroupProps.lockMovementX

Defined in

src/shapes/Object/types/LockInteractionProps.ts:7


lockMovementY

lockMovementY: boolean

When true, object vertical movement is locked

Default

Inherited from

GroupProps.lockMovementY

Defined in

src/shapes/Object/types/LockInteractionProps.ts:14


lockRotation

lockRotation: boolean

When true, object rotation is locked

Default

Inherited from

GroupProps.lockRotation

Defined in

src/shapes/Object/types/LockInteractionProps.ts:21


lockScalingFlip

lockScalingFlip: boolean

When true, object cannot be flipped by scaling into negative values

Default

Inherited from

GroupProps.lockScalingFlip

Defined in

src/shapes/Object/types/LockInteractionProps.ts:56


lockScalingX

lockScalingX: boolean

When true, object horizontal scaling is locked

Default

Inherited from

GroupProps.lockScalingX

Defined in

src/shapes/Object/types/LockInteractionProps.ts:28


lockScalingY

lockScalingY: boolean

When true, object vertical scaling is locked

Default

Inherited from

GroupProps.lockScalingY

Defined in

src/shapes/Object/types/LockInteractionProps.ts:35


lockSkewingX

lockSkewingX: boolean

When true, object horizontal skewing is locked

Default

Inherited from

GroupProps.lockSkewingX

Defined in

src/shapes/Object/types/LockInteractionProps.ts:42


lockSkewingY

lockSkewingY: boolean

When true, object vertical skewing is locked

Default

Inherited from

GroupProps.lockSkewingY

Defined in

src/shapes/Object/types/LockInteractionProps.ts:49


minScaleLimit

minScaleLimit: number

Minimum allowed scale value of an object

Default

0

Inherited from

GroupProps.minScaleLimit

Defined in

src/shapes/Object/types/ObjectProps.ts:27


moveCursor

moveCursor: null | string

Default cursor value used when moving this object on canvas

Default

null

Inherited from

GroupProps.moveCursor

Defined in

src/shapes/Object/types/FabricObjectProps.ts:34


multiSelectionStacking

multiSelectionStacking: MultiSelectionStacking

Defined in

src/shapes/ActiveSelection.ts:17


noScaleCache?

optional noScaleCache: boolean

When true, cache does not get updated during scaling. The picture will get blocky if scaled too much and will be redrawn with correct details at the end of scaling. this setting is performance and application dependant. default to true since 1.7.0

Default

true

Inherited from

GroupProps.noScaleCache

Defined in

src/shapes/Object/types/FabricObjectProps.ts:20


objectCaching

objectCaching: boolean

When true, object is cached on an additional canvas. When false, object is not cached unless necessary ( clipPath ) default to true

Since

1.7.0

Default

true

Inherited from

GroupProps.objectCaching

Defined in

src/shapes/Object/types/ObjectProps.ts:37


opacity

opacity: number

Opacity of an object

Default

1

Inherited from

GroupProps.opacity

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:11


originX

originX: TOriginX

Horizontal origin of transformation of an object (left, center, right or [0, 1]) See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups

Default

'left'

Inherited from

GroupProps.originX

Defined in

src/shapes/Object/types/BaseProps.ts:42


originY

originY: TOriginY

Vertical origin of transformation of an object (top, center, bottom or [0, 1]) See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups

Default

'top'

Inherited from

GroupProps.originY

Defined in

src/shapes/Object/types/BaseProps.ts:50


padding

padding: number

Padding between object and its controlling borders (in pixels)

Default

0

Inherited from

GroupProps.padding

Defined in

src/shapes/Object/types/ControlProps.ts:62


paintFirst

paintFirst: "fill" | "stroke"

Determines if the fill or the stroke is drawn first (one of “fill” or “stroke”)

Default

Inherited from

GroupProps.paintFirst

Defined in

src/shapes/Object/types/FillStrokeProps.ts:9


perPixelTargetFind

perPixelTargetFind: boolean

When set to true, objects are “found” on canvas on per-pixel basis rather than according to bounding box

Default

Inherited from

GroupProps.perPixelTargetFind

Defined in

src/shapes/Object/types/FabricObjectProps.ts:50


scaleX

scaleX: number

Object scale factor (horizontal)

Default

1

Inherited from

GroupProps.scaleX

Defined in

src/shapes/Object/types/BaseProps.ts:78


scaleY

scaleY: number

Object scale factor (vertical)

Default

1

Inherited from

GroupProps.scaleY

Defined in

src/shapes/Object/types/BaseProps.ts:85


selectable

selectable: boolean

When set to false, an object can not be selected for modification (using either point-click-based or group-based selection). But events still fire on it.

Default

Inherited from

GroupProps.selectable

Defined in

src/shapes/Object/types/FabricObjectProps.ts:58


selectionBackgroundColor

selectionBackgroundColor: string

Selection Background color of an object. colored layer behind the object when it is active. does not mix good with globalCompositeOperation methods.

Default

Inherited from

GroupProps.selectionBackgroundColor

Defined in

src/shapes/Object/types/FabricObjectProps.ts:43


shadow

shadow: null | Shadow

Shadow object representing shadow of this shape

Default

null

Inherited from

GroupProps.shadow

Defined in

src/shapes/Object/types/ObjectProps.ts:19


skewX

skewX: TDegree

Angle of skew on x axes of an object (in degrees)

Default

0

Inherited from

GroupProps.skewX

Defined in

src/shapes/Object/types/BaseProps.ts:92


skewY

skewY: TDegree

Angle of skew on y axes of an object (in degrees)

Default

0

Inherited from

GroupProps.skewY

Defined in

src/shapes/Object/types/BaseProps.ts:99


snapAngle?

optional snapAngle: TDegree

The angle that an object will lock to while rotating.

Inherited from

GroupProps.snapAngle

Defined in

src/shapes/Object/types/ObjectTransformProps.ts:8


snapThreshold?

optional snapThreshold: TDegree

The angle difference from the current snapped angle in which snapping should occur. When undefined, the snapThreshold will default to the snapAngle.

Inherited from

GroupProps.snapThreshold

Defined in

src/shapes/Object/types/ObjectTransformProps.ts:15


stroke

stroke: null | string | TFiller

When defined, an object is rendered via stroke and this property specifies its color takes css colors https://www.w3.org/TR/css-color-3/

Default

null

Inherited from

GroupProps.stroke

Defined in

src/shapes/Object/types/ObjectProps.ts:18


strokeDashArray

strokeDashArray: null | number[]

Array specifying dash pattern of an object’s stroke (stroke must be defined)

Default

null;

Inherited from

GroupProps.strokeDashArray

Defined in

src/shapes/Object/types/FillStrokeProps.ts:48


strokeDashOffset

strokeDashOffset: number

Line offset of an object’s stroke

Default

0

Inherited from

GroupProps.strokeDashOffset

Defined in

src/shapes/Object/types/FillStrokeProps.ts:55


strokeLineCap

strokeLineCap: CanvasLineCap

Line endings style of an object’s stroke (one of “butt”, “round”, “square”)

Default

butt

Inherited from

GroupProps.strokeLineCap

Defined in

src/shapes/Object/types/FillStrokeProps.ts:62


strokeLineJoin

strokeLineJoin: CanvasLineJoin

Corner style of an object’s stroke (one of “bevel”, “round”, “miter”)

Default

Inherited from

GroupProps.strokeLineJoin

Defined in

src/shapes/Object/types/FillStrokeProps.ts:69


strokeMiterLimit

strokeMiterLimit: number

Maximum miter length (used for strokeLineJoin = “miter”) of an object’s stroke

Default

4

Inherited from

GroupProps.strokeMiterLimit

Defined in

src/shapes/Object/types/FillStrokeProps.ts:76


strokeUniform

strokeUniform: boolean

When false, the stoke width will scale with the object. When true, the stroke will always match the exact pixel size entered for stroke width. this Property does not work on Text classes or drawing call that uses strokeText,fillText methods default to false

Since

2.6.0

Default

false

Default

false

Inherited from

GroupProps.strokeUniform

Defined in

src/shapes/Object/types/FillStrokeProps.ts:89


strokeWidth

strokeWidth: number

Width of a stroke used to render this object

Default

1

Inherited from

GroupProps.strokeWidth

Defined in

src/shapes/Object/types/FillStrokeProps.ts:41


subTargetCheck

subTargetCheck: boolean

Inherited from

GroupProps.subTargetCheck

Defined in

src/shapes/Group.ts:55


top

top: number

Top position of an object. Note that by default it’s relative to object top. You can change this by setting originY

Default

0

Inherited from

GroupProps.top

Defined in

src/shapes/Object/types/BaseProps.ts:20


touchCornerSize

touchCornerSize: number

Size of object’s controlling corners when touch interaction is detected

Default

24

Inherited from

GroupProps.touchCornerSize

Defined in

src/shapes/Object/types/ControlProps.ts:14


transparentCorners

transparentCorners: boolean

When true, object’s controlling corners are rendered as transparent inside (i.e. stroke instead of fill)

Default

true

Inherited from

GroupProps.transparentCorners

Defined in

src/shapes/Object/types/ControlProps.ts:21


visible

visible: boolean

When set to false, an object is not rendered on canvas

Default

Inherited from

GroupProps.visible

Defined in

src/shapes/Object/types/SerializedObjectProps.ts:40


width

width: number

Object width

Default

Inherited from

GroupProps.width

Defined in

src/shapes/Object/types/BaseProps.ts:27