ThreePipe
    Preparing search index...

    Function raiseOnPress

    • Brings a floating panel above the other registered panels when it is pressed (a click or the start of a drag anywhere in it), as windows on a desktop. Each panel gets its place in the order, 0 for the back, in the CSS variable --ui-raise. Its CSS adds it to the z-index of its UI layer, so the panels stay in their layer (see UI layers in CONTRIBUTING.md), and a state that must stay lower can leave the variable out:

      .my-panel { z-index: calc(150 + var(--ui-raise, 0)); }
      

      A panel registered later starts in front. Returns a function that unregisters the panel.

      Parameters

      • panel: HTMLElement

        the panel element (a press on any element in it counts)

      Returns () => void