<h2 id="ongloballypositioned-ongloballypositioned">onGloballyPositioned</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun SubspaceModifier.onGloballyPositioned(
    onGloballyPositioned: (SubspaceLayoutCoordinates) -> Unit
): SubspaceModifier
```

Invoke [onGloballyPositioned](/jetpack-compose/androidx.xr.compose/compose/functions/onGloballyPositioned) with the [SubspaceLayoutCoordinates](/jetpack-compose/androidx.xr.compose/compose/interfaces/SubspaceLayoutCoordinates) of the element when the global
position or the orientation of the content may have changed. Note that it will be called
**after** a composition when the coordinates are finalized.

This callback executes after composition once the final coordinates are determined. It will be
invoked at least once when the [SubspaceLayoutCoordinates](/jetpack-compose/androidx.xr.compose/compose/interfaces/SubspaceLayoutCoordinates) become available and subsequently
whenever the composable's transform (position, rotation, scale) is updated relative to the
subspace's origin.

The callback information will be relative to its subspace. For instance, When a nested subspace
is moved by the global subspace its Pose will reflect its position in the nested subspace. Its
position value will not be updated despite moving locations in the Global Subspace.