SelectionIndicatorViewModel

SelectionIndicatorViewModel

new

The view model for SelectionIndicator.

Parameters:
Name Type Description
scene Scene The scene instance to use for screen-space coordinate conversion.
selectionIndicatorElement Element The element containing all elements that make up the selection indicator.
container Element The DOM element that contains the widget.
Source:

Members

:Function

Gets or sets the function for converting the world position of the object to the screen space position. Expects the {Cartesian3} parameter for the position and the optional {Cartesian2} parameter for the result. Should return a {Cartesian2}. Defaults to SceneTransforms.wgs84ToWindowCoordinates
Example
selectionIndicatorViewModel.computeScreenSpacePosition = function(position, result) {
    return Cartesian2.clone(position, result);
};

:Element

Gets the HTML element containing the selection indicator.

:Boolean

Gets the visibility of the position indicator. This can be false even if an object is selected, when the selected object has no position.

:Cartesian3

Gets or sets the world position of the object for which to display the selection indicator.

:Scene

Gets the scene being used.

:Element

Gets the HTML element that holds the selection indicator.

:Boolean

Gets or sets the visibility of the selection indicator.

Methods

Animate the indicator to draw attention to the selection.

Animate the indicator to release the selection.

Updates the view of the selection indicator to match the position and content properties of the view model. This function should be called as part of the render loop.