Skip to content
  1. API
  2. Types

SVGLayer

Type: object

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

Properties

  • destroy () => SVGLayer Destroy the layer (remove it from the layer array, remove its listeners).
  • element SVGSVGElement SVG 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 () => SVGLayer Keep the layer in the layer array but hide its content.
  • isHidden () => boolean Check the layer visibility.
  • moveDown () => SVGLayer Take the layer down a notch (decreases its index by 1).
  • moveTo (depth: number) => SVGLayer Move the layer to the specified index in the layer array.
  • moveToBottom () => SVGLayer Move the layer at the very bottom of the array (index 0).
  • moveToTop () => SVGLayer Move the layer at the very top of the array (index length - 1).
  • moveUp () => SVGLayer Take the layer up a notch (increases its index by 1).
  • refresh SVGDrawingFunction Function rerendering the SVG.
  • setOpacity (opacity: number) => SVGLayer Set the layer opacity.
  • setPosition (position: {x: number, y: number}) => SVGLayer Setter setting the element translation in the graph space.
  • setSize (size: {width: number, height: number}) => SVGLayer Setter setting the element size in the graph space.
  • show () => SVGLayer Show the layer content.