linXiv frontend (TS/JS)
    Preparing search index...

    Function placeFloatingBox

    • Keep a floating box (the hover inspector) beside anchor, inside the canvas and clear of the panel column — the gutter fitViewport also frames around. Flips to the anchor's other side rather than sliding, so the box never covers the node it describes.

      Parameters

      • anchor: { x: number; y: number }
      • box: { height: number; width: number }
      • canvas: { gutter: number; height: number; width: number }
      • offset: number = 14
      • margin: number = 8

      Returns { left: number; top: number }