Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# egui_dock changelog

## egui_dock 0.18.0 - unreleased

### Changed

- Node separators are always clamped between their bounds. ([#289](https://github.com/Adanos020/egui_dock/pull/289))

## egui_dock 0.17.0 - 2025/07/13

### Breaking changes
Expand Down
20 changes: 6 additions & 14 deletions src/widgets/dock_area/show/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,20 +565,12 @@ impl<Tab> DockArea<'_, Tab> {
// Update 'fraction' interaction after drawing separator,
// otherwise it may overlap on other separator / bodies when
// shrunk fast.
if let Some(pos) = response.interact_pointer_pos().or(arrow_key_offset.map(|v| separator.center() + v)) {
let dim_point = pos.dim_point;
let delta = arrow_key_offset.unwrap_or(response.drag_delta()).dim_point;

if (delta > 0. && dim_point > midpoint && dim_point < rect.max.dim_point)
|| (delta < 0. && dim_point < midpoint && dim_point > rect.min.dim_point)
{
let range = rect.max.dim_point - rect.min.dim_point;
let min = (style.separator.extra / range).min(1.0);
let max = 1.0 - min;
let (min, max) = (min.min(max), max.max(min));
split.fraction = (split.fraction + delta / range).clamp(min, max);
}
}
let range = rect.max.dim_point - rect.min.dim_point;
let min = (style.separator.extra / range).min(1.0);
let max = 1.0 - min;
let (min, max) = (min.min(max), max.max(min));
let delta = arrow_key_offset.unwrap_or(response.drag_delta()).dim_point;
split.fraction = (split.fraction + delta / range).clamp(min, max);

if response.double_clicked() {
split.fraction = 0.5;
Expand Down
Loading