Equation Citator v1.3.12 Documentation
    Preparing search index...
    • Pure position computation for a popover anchored to the mouse cursor.

      The popover is placed just to the right/below the cursor (offset px away, so it never covers the cursor). For each axis independently, if that placement would overflow the viewport, try flipping to the left/above the cursor — but only if the flipped position is in-bounds (>= gutter). If the flip would also overflow, fall back to the original right/below placement (the popover is then allowed to overflow the viewport edge — better than placing it far from the cursor).

      All popovers in this plugin are triggered by hover, so the cursor position is always recorded at trigger time and passed in; the target element's rectangle is intentionally NOT part of the computation.

      Parameters

      • popRect: { height: number; width: number }
      • anchor: { x: number; y: number }
      • viewport: { height: number; width: number }
      • offset: number = 10
      • gutter: number = 10

      Returns { left: number; top: number }