Function fromElement

Initialise a rectangle based on the width and height of a HTML element.

import { Rects } from "https://unpkg.com/ixfx/dist/geometry.js"
Rects.fromElement(document.querySelector(`body`));
  • Parameters

    • el: HTMLElement

    Returns Rect