Configurator

Click together the options, drag the target and copy the code.

Try the options

The code below the stage is the configuration. Click a value to change it: a small dialog opens and the stage reacts at once. The dashed box is the boundary. Drag the blue target, or move it with the arrow keys, and the yellow item follows. The red dot marks itemAt on the item, the white dot marks targetAt on the target. The small boxes in front of the names in the code have the same colors, so you see what each property belongs to.

flip and stick only act when the item would leave the boundary. Drag the target towards an edge to see them work. The stage frame turns red while the item still overflows.

item
target

Calculated values

See also