BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    A set of annotations drawn by one template. Events: "loaded" (the query's rows are in), "error" (detail.error), "action" (detail: {action, row, event}), "expand" and "collapse" (detail: {row, pinned}, a card opened or closed)

    Type Parameters

    • D = Record<string, unknown>

    Hierarchy

    • EventTarget
      • AnnotationLayer
    Index

    Constructors

    • Type Parameters

      • D = Record<string, unknown>

      Returns AnnotationLayer

    Properties

    expandMode: "none" | "click" | "hover"

    When the cards show: the expand option, "none" for a layer shown only on hover, the template's default, or "hover" for an expandable template

    group: string
    keyMode: "qid" | "globalId"

    What identifies its rows, fixed when it is made: the key option, else the template's default

    ready: Promise<void>

    Settles when the query's rows are in; rejects when the query fails

    removed: boolean
    size: number

    How many rows are shown

    visible: boolean

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Closes a row's card, or all of the layer's cards

      Parameters

      • Optionalkey: string | Qid

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Opens a row's card in every viewer, pinned unless {pin: false}; false without such a row or an expandable template

      Parameters

      • key: string | Qid
      • Optionaloptions: { pin?: boolean }

      Returns boolean

    • Runs the query again, dropping a run in flight, and diffs the result by key

      Returns Promise<void>

    • Removes the layer from every viewer

      Returns void

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Parameters

      Returns void

    • Parameters

      • options: Partial<
            Pick<
                AnnotationLayerOptions<D>,

                    | "occlusion"
                    | "clustering"
                    | "limit"
                    | "scaleByDistance"
                    | "maxDistanceMm"
                    | "visibility"
                    | "anchor"
                    | "align"
                    | "expand"
                    | "dotBeyondMm"
                    | "onClick"
                    | "onAction",
            >,
        >

      Returns void

    • Parameters

      • query:
            | string
            | {
                get?: Record<string, string>;
                models?: string[];
                parameters?: Record<string, unknown>;
                where?: string;
            }
            | null
            | undefined

      Returns Promise<void>

    • Replaces the application's rows, diffed by key: unchanged rows keep their DOM

      Parameters

      Returns void

    • Another template for the same rows; the query runs again when its fields differ

      Parameters

      Returns Promise<void>

    • Parameters

      • visible: boolean

      Returns void

    • Merges a patch into a row's data; updates within one task reach the viewers once, and only shown rows re-render

      Parameters

      • key: string | Qid
      • patch: Partial<D>

      Returns void

    • Parameters

      • patches: Iterable<[key: string | Qid, patch: Partial<D>]>

      Returns void