Skip to main content

LayoutEvent Object Type

LayoutEvent object is returned in the callback as a result of component layout change, for example onLayout in View component.

Exampleโ€‹

{
layout: {
width: 520,
height: 70.5,
x: 0,
y: 42.5
},
target: 1127
}

Keys and valuesโ€‹

heightโ€‹

Height of the component after the layout changes.

TypeOptional
numberNo

widthโ€‹

Width of the component after the layout changes.

TypeOptional
numberNo

xโ€‹

Component X coordinate inside the parent component.

TypeOptional
numberNo

yโ€‹

Component Y coordinate inside the parent component.

TypeOptional
numberNo

targetโ€‹

The node id of the element receiving the PressEvent.

TypeOptional
number, null, undefinedNo

Used byโ€‹