Interface HasLayers

Interface for any object that can contain Layer.

Hierarchy

  • HasLayers

Implemented by

Properties

Accessors

Methods

Properties

hasLayers: true

Read-only flag to check if a given object is of type HasLayers.

Accessors

  • get layerCount(): number
  • Returns the number of layers currently in this object.

    Returns number

Methods

  • Applies the callback to each layer in the object.

    Parameters

    Returns void

  • Returns a new array containing the layers in this object. Optionally, the predicate can be used to filter out unwanted layers.

    // Get all layers from the object.
    const allLayers = obj.getLayers();

    // Get all color layers from the object.
    const colorLayers = obj.getLayers((layer) => layer.isColorLayer);

    Parameters

    Returns Layer<LayerEvents, LayerUserData>[]

Generated using TypeDoc