Skip to main content

label_side_for_y

Function label_side_for_y 

Source
pub fn label_side_for_y(bbox: Rect, y: f32) -> LabelSide
Expand description

The LabelSide a block label snaps to when its anchor is dragged to y: the top third of the block is Top, the bottom third Bottom, the middle Center. Shared by the live drag preview and the drag-commit so both agree.