Skip to main content

SurfacePopupComponent

Provides a means to wire up a popup that is shown when users tap on a vertex.

Use it like this:

<vjs-surface-popup selector=".my-launcher" anchor="bottom">
<ng-template let-vertex="vertex" let-model="model" let-ui="ui" let-hide="hide">
<div>Popup content for {{vertex.data.name}}</div>
</ng-template>
</vjs-surface-popup>

Your popup should expose inputs for

  • vertex The vertex the popup is attached to
  • model The underlying model
  • ui The UI that rendered this popup
  • hide A function you can invoke to close the popup, if you need to.

Implements

  • AfterViewInit
  • OnDestroy

Methods

ngAfterViewInit()

ngAfterViewInit(): void

A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated.

Returns

void

Implementation of

AfterViewInit.ngAfterViewInit


ngOnDestroy()

ngOnDestroy(): void

A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

Returns

void

Implementation of

OnDestroy.ngOnDestroy

Properties

anchor?

optional anchor: PopupPosition

Optional position to place this popup. Defaults to "bottom", and can also be overridden on a per-launcher basis via a DOM attribute.

Input


selector

selector: string

CSS3 selector identifying elements from which this popup is launched.

Input


template

template: TemplateRef<any>

Template containing popup content