Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module utils/hover-template

    The hover placeholder vocabulary, and the one place it is substituted.

    A picked element resolves to a small set of values — its label, the layer path it belongs to, its element index — and THREE different consumers turn those into a string:

    consumer escaping where
    hover tooltip escapeHtml for overlay_html ui/overlay-manager.ts
    link (left-click) encodeURIComponent, always core/app/interaction/
    copy (right-click) none — plain text to clipboard core/app/interaction/

    They must agree on the vocabulary and disagree on the escaping, which is exactly the shape that rots when it is written out three times. Hence one substitution function taking a TemplateMode.

    Pure: no DOM, no config, no layer dependencies — it lives in utils/ beside escape-html.ts so ui/ and core/ can both reach it.

    HoverTemplateValues
    HoverTemplateResult
    TemplateMode
    substituteHoverTemplate