Hierarchy

  • Obj

Constructors

Properties

DEFAULT_BASE_STYLE: BaseStyle = ...
DEFAULT_OBJ_STYLE: ObjStyle = ...
_children: Obj[] = []
_geom: Geom
_id: string
_isLayer: boolean = false
_name: string
_oc: any
_parent: Obj = null
_shapeType: string
_shapes: ShapeCollection = ...
_style: ObjStyle = null
_visible: boolean = true

Accessors

  • get id(): string
  • Returns string

Methods

  • Internal: get RGBA values of current color in range [0-1] for RGB and A

    Returns [number, number, number, number]

  • Try to get as many properties for easy introspection

    Returns void

  • Gets the direct children of this Obj

    Returns Obj[]

  • set Color for Obj/Layer. Shortcut of style

    Parameters

    • newColor: string | number | number[]

    Returns Obj

  • Recursively get all Objs in this Obj container

    Returns Obj[]

  • Get current Obj color or the one that is defined by one of the parents up the hierarchy

    Returns number

  • Parameters

    • Optional name: string

    Returns Obj

  • Does this Obj contain multiple Shapes

    Returns boolean

  • get/setter method for name property

    Parameters

    • Optional name: string

    Returns string | Obj

  • Remove an object from children

    Parameters

    Returns void

  • Parameters

    • t: any

    Returns void

  • Set this Obj as a child of another

    Parameters

    Returns void

  • Get type of Shape(s) in this Object

    Returns string

  • Return Obj ShapeCollection: NOTE: use allShapes() to also get the Shapes of children. For example layers don't have Shapes of their own! !!!! IMPORTANT: returns reference. So don't change the return value !!!!

    Returns ShapeCollection

  • set strokeWidth

    Parameters

    • n: number

    Returns Obj

  • Get or set style NOTE: We don't use get/setters because we want to be able to return Obj for setter

    Parameters

    • newStyle: any

    Returns Obj

  • Output all properties of this Obj including that of its Shapes into a { key value } row

    Returns Object

  • Returns string

Generated using TypeDoc