Class ShapeModel<T, P>Abstract
Constructors
constructor
- new ShapeModel<T, P>(board, node, config?): ShapeModel<T, P>
Type Parameters
- T extends Shape<ShapeConfig> | Group = Shape<ShapeConfig> | Group
- P extends ShapeConfig = ShapeConfig
Accessors
group
- get group(): Nullable<string>
- set group(name): void
Returns void
isActive
- get isActive(): boolean
Returns boolean
isDeleted
- get isDeleted(): boolean
Returns boolean
isInvisible
- get isInvisible(): boolean
Returns boolean
isSelectable
- get isSelectable(): boolean
Returns boolean
- set isSelectable(selectable): void
Returns void
isVisible
- get isVisible(): any
Returns any
name
- get name(): string
Returns string
Abstract
type
- get type(): string
Returns string
Methods
addFilter
- addFilter(filter): void
Returns void
delete
- delete(): void
Returns void
deselect
- deselect(): void
Returns void
destroy
- destroy(): void
Returns void
flipX
- flipX(): void
Returns void
flipY
- flipY(): void
Returns void
hasGroup
- hasGroup(): boolean
Returns boolean
height
- height(): number
Returns number
hide
- hide(): Shape<ShapeConfig> | Group
Returns Shape<ShapeConfig> | Group
removeFilter
- removeFilter(filter): void
Returns void
rotate
- rotate(theta): void
Returns void
scale
- scale(): undefined | Vector2d
Returns undefined | Vector2d
scaleX
- scaleX(): number
Returns number
scaleY
- scaleY(): number
Returns number
select
- select(): void
Returns void
show
- show(): Shape<ShapeConfig> | Group
Returns Shape<ShapeConfig> | Group
to
- to(attributes): void
Parameters
- attributes: Partial<P> & {
duration: number;
} & Partial<{
onFinish: (() => void);
onUpdate: (() => void);
}>
Returns void
undelete
- undelete(): void
Returns void
update
- update(attributes): void
Returns void
width
- width(): number
Returns number
x
- x(): number
Returns number
y
- y(): number
Returns number
Creates a new shape