plotomics
    Preparing search index...

    Function measure

    • Measure a container: the size of its padding box, inside any border, which is the box its absolutely placed layers fill, and the size autoResize reports too. A container with no box, hidden or not in the page, measures as fallback.

      A plot drawn at the fallback height into a container with no height would cover the content below it, so two kinds of container are also given the fallback height, through a CSS rule that every page rule wins over: one laid out in the page with no content height, such as a plain div with no CSS height, and one not in the page yet, which is often added to the page after the plot is drawn. Such a container is watched from then on, so the fallback follows it into a shadow root and is dropped when the page gives it a height. A container hidden at creation, as in a tab not shown, gets no fallback: its size is not known until it is shown, and autoResize handles it then. Each component's destroy() undoes this through releaseContainer.

      Parameters

      • el: HTMLElement
      • fallback: { height: number; width: number } = ...

      Returns { height: number; width: number }