Skip to main content

Class: Layer

Hierarchy#

  • ShapeContainer

    ↳ Layer

Constructors#

constructor#

+ new Layer(name?: string): Layer

Parameters#

NameTypeDefault value
namestring"New Layer"

Returns: Layer

Overrides: ShapeContainer.constructor

Accessors#

active#

• get active(): boolean

Returns: boolean

• set active(active: boolean): void

Parameters#

NameType
activeboolean

Returns: void


attr#

• get attr(): Attributes

Returns: Attributes


children#

• get children(): Shape[]

Returns: Shape[]


fill#

• set fill(fill: string): void

Parameters#

NameType
fillstring

Returns: void


name#

• get name(): string

Returns: string

• set name(name: string): void

Parameters#

NameType
namestring

Returns: void


stroke#

• set stroke(stroke: number): void

Parameters#

NameType
strokenumber

Returns: void


strokeWidth#

• set strokeWidth(strokeWidth: number): void

Parameters#

NameType
strokeWidthnumber

Returns: void


transform#

• set transform(transform: string): void

Parameters#

NameType
transformstring

Returns: void


type#

• get type(): string

Returns: string


uuid#

• get uuid(): string

Returns: string

Methods#

addChildren#

â–¸ addChildren(children: Shape): void

Parameters#

NameType
childrenShape

Returns: void

Inherited from: ShapeContainer.addChildren


addShape#

â–¸ addShape(shape: Shape): void

Parameters#

NameType
shapeShape

Returns: void


draw#

â–¸ draw(shape: Shape, requestRender: Function): void

Parameters#

NameType
shapeShape
requestRenderFunction

Returns: void


drawShape#

â–¸ drawShape(): void

Returns: void

Inherited from: ShapeContainer.drawShape


onViewUpdate#

â–¸ onViewUpdate(): void

Returns: void

Inherited from: ShapeContainer.onViewUpdate


setAttributes#

â–¸ setAttributes(attr: Attributes): void

Parameters#

NameType
attrAttributes

Returns: void

Inherited from: ShapeContainer.setAttributes


toObject#

â–¸ toObject(): ShapeChildren

Returns: ShapeChildren

Inherited from: ShapeContainer.toObject


transformAttributes#

â–¸ transformAttributes(): Attributes

Returns: Attributes

Inherited from: ShapeContainer.transformAttributes