Skip to content
  1. API
  2. Types

Overlay

Type: object

The layer object containing its properties (overloaded for handling transformed elements).

Properties

  • destroy () => Overlay Destroy the layer (remove it from the layer array, remove its listeners).
  • element HTMLElement HTML element used by the layer.
  • getLevel () => number Retrieves the index of the layer in the layer array.
  • getOpacity () => number Get the layer opacity, between 0 and 1.
  • hide () => Overlay Keep the layer in the layer array but hide its content.
  • isHidden () => boolean Check the layer visibility.
  • moveDown () => Overlay Take the layer down a notch (decreases its index by 1).
  • moveTo (depth: number) => Overlay Move the layer to the specified index in the layer array.
  • moveToBottom () => Overlay Move the layer at the very bottom of the array (index 0).
  • moveToTop () => Overlay Move the layer at the very top of the array (index length - 1).
  • moveUp () => Overlay Take the layer up a notch (increases its index by 1).
  • setOpacity (opacity: number) => Overlay Set the layer opacity.
  • setPosition (position: {x: number, y: number}) => Overlay Setter setting the element translation in the graph space.
  • setSize (size: {width: number, height: number}) => Overlay Setter setting the element size in the graph space.
  • show () => Overlay Show the layer content.