SandDance

vega-deck.gl .Presenter

Class which presents a Stage of chart data using Deck.gl to render.

class Presenter

Constructor

constructor(el, style)

Instantiate a new Presenter.

public constructor(el: HTMLElement, style?: PresenterStyle);

Parameters

Name Type Description
el HTMLElement Parent HTMLElement to present within.
style PresenterStyle Optional PresenterStyle styling options.

Methods

animationCancel()

Cancels any pending animation, calling animationCanceled() on original queue.

public animationCancel(): void;

Return type

void


animationQueue(handler, timeout, options)

Stops the current animation and queues a new animation.

public animationQueue(handler: () => void, timeout: number, options?: QueuedAnimationOptions): void;

Parameters

Name Type Description
handler () => void Function to invoke when timeout is complete.
timeout number Length of time to wait before invoking the handler.
options QueuedAnimationOptions Optional QueuedAnimationOptions object.

Return type

void


getElement(type)

Retrieve a sub-element of the rendered output.

public getElement(type: PresenterElement): HTMLElement;

Parameters

Name Type Description
type PresenterElement PresenterElement type of the HTMLElement to retrieve.

Return type

HTMLElement


present(sceneOrStage, height, width, config)

Present the Vega Scene, or Stage object using Deck.gl.

public present(sceneOrStage: Scene3d | Stage, height: number, width: number, config?: PresenterConfig): void;

Parameters

Name Type Description
sceneOrStage Scene3d | Stage Vega Scene object, or Stage object containing chart layout info.
height number Height of the rendering area.
width number Width of the rendering area.
config PresenterConfig Optional presentation configuration object.

Return type

void


rePresent(stage, modifyConfig)

Present the same recently rendered Stage with only slight modifications such as a color change, using the previous Stage values as a basis.

public rePresent(stage: Partial<Stage>, modifyConfig?: PresenterConfig): void;

Parameters

Name Type Description
stage Partial<Stage> Partially populated Stage object containing changes.
modifyConfig PresenterConfig Optional presentation configuration object.

Return type

void


homeCamera()

Home the camera to the last initial position.

public homeCamera(): void;

Return type

void


getCubeData()

Get cube data array from the cubes layer.

public getCubeData(): Cube[];

Return type

Cube[]


showGuides()

Show guidelines of rendering height/width and center of OrbitView.

public showGuides(): void;

Return type

void


finalize()

public finalize(): void;

Return type

void

Properties

animationTimer

Handle of the timer for animation.

public animationTimer: number;

Type

number


deckgl

Deck.gl instance for rendering WebGL.

public deckgl: DeckGL_Class;

Type

DeckGL_Class


logger

Logger, such as console.log

public logger: (message?: any, optionalParams: any[]) => void;

Type

(message?: any, optionalParams: any[]) => void


stage

Get the previously rendered Stage object.

public get stage: Stage;

Type

Stage


style

Options for styling the output.

public style: PresenterStyle;

Type

PresenterStyle


view

Get the current View camera type.

public get view: View;

Type

View