Options
All
  • Public
  • Public/Protected
  • All
Menu

Layers are used to group activities together. Activities on the same layer are drawn at the same time (z-order). A layer has a name, an ID, it can be turned on / off, and their opacity can be changed. These changes have an impact on all activities on that layer. The ID of the layer is used for drag and drop operations of activities between different Gantt charts. Dropped activities will be added to the layer with the same ID. The layer name will be used as the default ID for newly created layers. The ID only needs to be changed if the same layer type will be used with different names in different Gantt charts.

since

1.0

Hierarchy

  • Layer

Index

Constructors

constructor

  • new Layer(name?: string): Layer
  • Constructs a new layer with the given name or Layer.DEFAULT_NAME.

    Parameters

    • Default value name: string = Layer.DEFAULT_NAME

      the name of the layer

    Returns Layer

Properties

Static DEFAULT_NAME

DEFAULT_NAME: string = "N/A"

Methods

getEffectiveOpacity

  • getEffectiveOpacity(): number
  • Returns number

getFadeInOutOpacity

  • getFadeInOutOpacity(): number
  • Returns the fade in / fade out opacity value.

    since

    1.0

    Returns number

    the fade in / fade out opacity value

getId

  • getId(): string
  • Returns the layer id.

    since

    1.0

    Returns string

    the layer id

getName

  • getName(): string
  • Returns the layer name.

    since

    1.0

    Returns string

    the layer name

getOpacity

  • getOpacity(): number
  • Returns the opacity of the layer.

    since

    1.0

    Returns number

    the opacity of the layer

isDeletable

  • isDeletable(): boolean
  • Returns true if the layer can be deleted.

    since

    1.0

    Returns boolean

    true if the layer can be deleted

isVisible

  • isVisible(): boolean
  • Returns true if the layer is visible.

    since

    1.0

    Returns boolean

    true if the layer is visible

setDeletable

  • setDeletable(deletable: boolean): void
  • Sets if the layer can be deleted.

    since

    1.0

    Parameters

    • deletable: boolean

      the new deletable value

    Returns void

setFadeInOutOpacity

  • setFadeInOutOpacity(fadeInOutOpacity: number): void
  • Sets the layer fadeInOutOpacity.

    since

    1.0

    Parameters

    • fadeInOutOpacity: number

      the new opacity

    Returns void

setId

  • setId(id: string): void
  • Sets the id of the layer.

    since

    1.0

    Parameters

    • id: string

      the new id of the layer

    Returns void

setName

  • setName(name: string): void
  • Sets the layer name.

    since

    1.0

    Parameters

    • name: string

      the new name of the layer

    Returns void

setOpacity

  • setOpacity(opacity: number): void
  • Sets the layer opacity.

    since

    1.0

    Parameters

    • opacity: number

      the new opacity of the layer

    Returns void

setVisible

  • setVisible(visible: boolean): void
  • Sets the visibility of the layer.

    Parameters

    • visible: boolean

      the new visibility of the layer

    Returns void

toString

  • toString(): string
  • Returns a string representation of the layer (its name).

    since

    1.0

    Returns string

    a string representation of the layer (its name)