Skip to content

Commit

Permalink
cleaned up docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed Jan 25, 2024
1 parent 68e430f commit 64f6363
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,11 @@ impl<Pane> Tree<Pane> {
/// If the insertion index is greater than the current number of children, the tile is appended at the end.
///
/// The grid layout needs a special treatment because it can have holes. When dragging a tile away from a grid, it
/// leaves behind it a hole. As a result, if the tile is dropped in the same grid, it there is no need to account
/// for an insertion index shift. However, if the tiles are reorder in a separate, linear representation of the grid
/// (such as the Rerun blueprint tree), the expectation is that the grid is reordered and thus the insertion index
/// must be shifted in case the tile is moved inside the same grid.
/// leaves behind it a hole. As a result, if the tile is the dropped in the same grid, it there is no need to account
/// for an insertion index shift (the hole can still occupy the original place of the dragged tile). However, if the
/// tiles are reordered in a separate, linear representation of the grid (such as the Rerun blueprint tree), the
/// expectation is that the grid is properly reordered and thus the insertion index must be shifted in case the tile
/// is moved inside the same grid. The `reflow_grid` parameter controls this behavior.
///
/// TL;DR:
/// - when drag-and-dropping from a 2D representation of the grid, set `reflow_grid = false`
Expand Down

0 comments on commit 64f6363

Please sign in to comment.