ixfx
    Preparing search index...

    Class ElementSizer<T>

    Consider using static methods:

    // Resize an <SVG> element to match viewport
    Dom.ElementSizer.svgViewport(svg);

    // Resize canvas to match its parent
    Dom.ElementSizer.canvasParent(canvas);

    // Resize canvas to match viewport
    Dom.ElementSizer.canvasViewport(canvas);

    Type Parameters

    • T extends HTMLElement | SVGElement
    Index

    Accessors

    Constructors

    Methods

    • Parameters

      • Optionalreason: string

      Returns void

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

      Parameters

      Returns void

    • Size an SVG element to match viewport

      Parameters

      • svg: SVGElement
      • OptionalonSizeSet: (size: Rect) => void

      Returns ElementSizer<SVGElement>