Skip to main content

project_layout

Function project_layout 

Source
pub fn project_layout<K>(
    items: &[K],
    rects: &HashMap<K, Rect>,
    active: &K,
    target: &DropPlacement<K>,
) -> Vec<ItemTransform<K>>
where K: Clone + Eq + Hash,
Expand description

Project a stable-ID insertion by mapping each item to the measured slot it would occupy after the move. Because slots come from real rects, this does not assume a uniform row pitch.