Function conrod::graph::algo::scroll_offset
[−]
[src]
pub fn scroll_offset(graph: &Graph, idx: Id) -> Point
Return the scroll_offset for the widget at the given index.
The offset is retrieved from the widget that is the immediate depth_parent of the widget at
the given idx unless:
- the immediate
depth_parentofidxis also agraphic_parenttoidx. In this case,NO_OFFSETwill be returned, as child widgets that are graphical elements of their parents should not be affected by scrolling. - one of the position parents also has the same
depth_parent. In this case,NO_OFFSETwill be returned, as we know that our scroll offset has already been applied via the widget to which we are relatively positioned.