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

    • TextendsHTMLElement | SVGElement

    Constructors

    Accessors

    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: { zIndex?: number } & ElementSizerOptions<HTMLCanvasElement>

      Returns ElementSizer<HTMLCanvasElement>

    • Size an SVG element to match viewport

      Parameters

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

      Returns ElementSizer<SVGElement>