Skip to content
  1. API
  2. Types
  3. OverlayOptions

OverlayOptions ​

Type: object

HTML element provided with its affine transformation in the graph space.

Properties

  • batched(optional) boolean[=true] Route the overlay through a shared wrapper layer so that a view change updates a single element instead of one per overlay. Recommended when many overlays are present. Set to false to keep an independent per-element transform (finer cross-layer z-ordering). Passing an explicit index implies batched: false unless batched: true is set, since batched overlays share one wrapper and cannot take an individual z-index.
  • cull(optional) boolean|{margin:number}[=true] When batched, hide this overlay while its anchor falls outside the viewport (plus an optional pixel margin) to keep large overlay counts cheap. Applied per-overlay: set to false to keep this overlay always rendered without affecting others.
  • element HTMLElement|string HTML element being transformed. You can also provide an HTML string.
  • position {x: number, y: number} The element translation in the graph space.
  • scaled(optional) boolean[=true] Whether or not the overlay should be scaled together with the graph.
  • size(optional) {width: number, height: number} The element size in the graph space.