FluidContainer.shallowScrollTo

Scroll towards the given children node. This should change the parent's properties (without affecting the child) so that the child enters the viewport, or becomes as close to it as possible.

interface FluidContainer
shallowScrollTo

Parameters

child Node

Node to scroll towards. Must be a direct child of this node.

viewport Vector2

Size of the current viewport. The parent should

parentBox Rectangle

This node's current padding box.

childBox Rectangle

The child's current padding box.

Return Value

Type: Rectangle

Estimated new padding box for the child.

See Also

fluid.actions.scrollIntoView for recursive scrolling via TreeAction.

Meta