pub trait Position {
// Required method
fn center_and_bounce(&mut self, position: Point, bounds: Size);
}Expand description
Trait containing functions for positioning of nodes.
Required Methods§
Sourcefn center_and_bounce(&mut self, position: Point, bounds: Size)
fn center_and_bounce(&mut self, position: Point, bounds: Size)
Centers this node around the given position. If the node is over the specified bounds it’s bouncing back to be fully visible on screen.