TagCloudItem.getPosition

Syntax

getPosition();

Description

The getPosition method returns item position in the tag area.

Comments

Returned value - object of the PP.Vector3 class.

Example

To execute the example, the page must contain the TagCloud component named tagCloud (see Example of Creating the TagCloud Component). The example must be placed in the <script> tag. Get position of the first cloud tag:

// Get position of the first cloud tag
console.log("Coordinate X: " + tagCloud.getItems()[0].getPosition().getX());
console.log("Coordinate Y: " + tagCloud.getItems()[0].getPosition().getY());
console.log("Coordinate Z: " + tagCloud.getItems()[0].getPosition().getZ());

As a result, the console displays coordinates of the first cloud tag position:

Coordinate X: 150

Coordinate Y: -112.5

Coordinate Z: 0

See also:

TagCloudItem