[−][src]Function conrod_core::graph::algo::scroll_offset
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_parent
ofidx
is also agraphic_parent
toidx
. In this case,NO_OFFSET
will 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_OFFSET
will be returned, as we know that our scroll offset has already been applied via the widget to which we are relatively positioned.