Skip to main content

icon_rect_after_resize

Function icon_rect_after_resize 

Source
pub fn icon_rect_after_resize(icon: Rect, old: Rect, new: Rect) -> Rect
Expand description

Where a block’s icon lands when the block’s rect goes from old to new: it rides the block’s center, then is shifted back inside if the block shrank past it. Shared by the resize preview and the commit so the icon doesn’t jump when the drag is released.