relativeTo( )

relativeTo() : Node[];

Gets an array of nodes that this node's location is relative to.

For more information see:

Default value: []

Returns

The array of nodes that this node's location is relative to.

Example

// Accessing one of the elements of the returned array, in this case the first element.
var r = myobject.relativeTo()[0];
if (r === Z.screenRight) {
    // myobject is located relative to the right of the screen
}
zapcode branded_zapcode i