Class: VisualizationPanelView

VisualizationPanelView()

A full-screen overlay panel that displays an external visualization application in an iframe above the map. Opened by clicking an 'iframe' type button on a ViewfinderCardView card. Closed by clicking the close button in the upper right, pressing the Escape key, or by clicking another card action. Security: the iframe `src` is only set when the URL matches the app's `trustedContentSources` configuration. Untrusted URLs are displayed as a plain link instead.

Screenshot

Constructor

new VisualizationPanelView()

Since:
  • 2.37.0
Source:

Extends

  • Backbone.View

Members

className

Source:

type :string

The type of View this is
Type:
  • string
Source:

Methods

close()

Close the panel, stop the iframe, and fire a "close" event.
Source:

events()

The events this view will listen to and the associated function to call.
Source:

getExpectedMessageOrigin(action, resolvedUrl) → {string|null}

Resolve expected postMessage origin for the current iframe action.
Parameters:
Name Type Description
action object | null The active iframe action object.
resolvedUrl string The URL currently loaded in the iframe.
Since:
  • 2.38.0
Source:
Returns:
Strict origin expected for postMessage events.
Type
string | null

initialize()

Bind the Escape-key handler once so the same reference can be added and removed from the document.
Source:

isSourceFromActiveIframe(iframeWindow, sourceWindow) → {boolean}

Check whether a postMessage source window belongs to the active iframe's browsing context. This accepts the iframe window itself and same-origin descendant frames within that iframe.
Parameters:
Name Type Description
iframeWindow Window The active iframe content window.
sourceWindow WindowProxy | null The postMessage source window.
Since:
  • 2.38.0
Source:
Returns:
`true` when sourceWindow is the iframe or a descendant.
Type
boolean

onClose()

Cleanup global handlers if the view is destroyed while open.
Source:

open(payload)

Open the panel and load the given URL in the iframe. If the URL is not trusted, show a plain link fallback instead.
Parameters:
Name Type Description
payload string | object The URL string to load or an object with `{ url, action }` for URL-template-aware visualizations.
Source:

render() → {VisualizationPanelView}

Render the panel. The panel is hidden by default; call `open()` to show it.
Source:
Returns:
Returns the rendered view element.
Type
VisualizationPanelView