Skip to main content

Component

Component

Overview needed


Constructor

protected Component

new Component(size, initialProps)

*Description needed*

Parameters

  •  size: VectorDescription needed

  •  initialProps: RecordDescription needed


Properties

No publicly accessible properties on Component

protected transform: Transform

Description needed

protected dirtyTransform: false | true

Description needed


Methods

public setProp

setProp(key, val) => void

Description needed

Parameters

  •  key: stringDescription needed

  •  val: anyDescription needed

public onTransformChange

onTransformChange() => void

Description needed

public setPos

setPos(v) => void

Description needed

Parameters

  •  v: VectorDescription needed

public setAngle

setAngle(a) => void

Description needed

Parameters

  •  a: numberDescription needed

public setSize

setSize(s) => void

Description needed

Parameters

  •  s: VectorDescription needed

public setRotationAbout

setRotationAbout(a, c) => void

Description needed

Parameters

  •  a: numberDescription needed

  •  c: VectorDescription needed

public isWithinSelectBounds

isWithinSelectBounds(v) => false | true

Determines whether or not a point is within this component's "selectable" bounds.

Parameters

  •  v: Vector – The point.

Returns

  •   false | true – True if the point is within this component, false otherwise.

public getPorts

getPorts() => Port[]

Description needed

Returns

  •   Port[]Description needed

public getConnections

getConnections() => Wire[]

Description needed

Returns

  •   Wire[]Description needed

public getPos

getPos() => Vector

Description needed

Returns

  •   VectorDescription needed

public getSize

getSize() => Vector

Description needed

Returns

  •   VectorDescription needed

public getAngle

getAngle() => number

Description needed

Returns

  •   numberDescription needed

public getTransform

getTransform() => Transform

Description needed

Returns

  •   TransformDescription needed

public getOffset

getOffset() => Vector

Description needed

Returns

  •   VectorDescription needed

public getPropInfo

getPropInfo(key) => BasePropInfo & { type: "boolean"; } | BasePropInfo & { type: "button"; getText: (states: any[]) => string; getNewState: (states: any[]) => any; } | BasePropInfo & UnitInfo | BasePropInfo & { type: "string"; constraint?: RegExp; } | BasePropInfo & { type: "color"; } | BasePropInfo & { type: "string[]"; options: [string, string][]; } | BasePropInfo & { type: "number[]"; options: [string, number][]; } | BasePropInfo & { type: "veci" | "vecf"; min?: Vector; max?: Vector; step?: Vector; }

Description needed

Parameters

  •  key: stringDescription needed

Returns

public getMinPos

getMinPos() => Vector

Description needed

Returns

  •   VectorDescription needed

public getMaxPos

getMaxPos() => Vector

Description needed

Returns

  •   VectorDescription needed

public getImageName

getImageName() => string

Description needed

Returns

  •   stringDescription needed

Static Methods

No static methods for Component