Class ElementSizer<T>

Type Parameters

  • T extends HTMLElement | SVGElement

Constructors

Accessors

  • get size(): Rect
  • Returns Rect

  • set size(size): void
  • Parameters

    Returns void

Methods

  • Parameters

    • Optionalreason: string

    Returns void

  • Sets the 'natural' size of an element. This can also be specified when creating ElementSizer.

    Parameters

    Returns void

  • Parameters

    • canvasElementOrQuery: string | HTMLCanvasElement
    • options: ElementSizerOptions<HTMLCanvasElement>

    Returns ElementSizer<HTMLCanvasElement>

  • Parameters

    • canvasElementOrQuery: string | HTMLCanvasElement
    • options: {
          zIndex?: number;
      } & ElementSizerOptions<HTMLCanvasElement>

    Returns ElementSizer<HTMLCanvasElement>