plotomics
    Preparing search index...

    Function createResetButton

    • Add the reset button of a plot to parent, the plot box, and call onReset when it is pressed: with the mouse, or with Enter or Space once it has the focus. A wheel over the button goes to wheelTarget(), the element the plot zooms on, so it zooms as it would over the plot and the page does not scroll. It is a plain HTML button named "Reset view", so a screen reader names it, and the exports, which draw the canvases and the SVG layers only, never hold it. Its colours come from the theme as the plot reads them inside el, the plot's element: the axis colour for the house it shows, the theme background behind it and the grid colour for its edge. It starts hidden; call ResetButton.place to put it in place. Removing the plot box removes it.

      Parameters

      • parent: HTMLElement
      • el: HTMLElement
      • onReset: () => void
      • OptionalwheelTarget: () => Element | null

      Returns ResetButton