Function detect_overflow

Source
pub fn detect_overflow<Element: Clone + 'static, Window: Clone + 'static>(
    state: MiddlewareState<'_, Element, Window>,
    options: DetectOverflowOptions<Element>,
) -> SideObject
Expand description

Resolves with an object of overflow side offsets that determine how much the element is overflowing a given clipping boundary on each side.

  • positive = overflowing the boundary by that number of pixels
  • negative = how many pixels left before it will overflow
  • 0 = lies flush with the boundary

See the Rust Floating UI book for more documentation.