Skip to main content

rank_from

Function rank_from 

Source
pub fn rank_from(
    ctx: &Context,
    layer: LayerId,
    rank: Rank,
    opener: LayerId,
) -> bool
Expand description

Puts layer at rank when the layer it was opened from, opener, lies at that rank or below it (a panel, a window, a lying-over zone, another overlay); leaves it unranked, above its opener, when the opener is above that rank (a dialog, a menu). Returns whether it was ranked.

A hover card or a popover opened from a dialog thus stays above the dialog.