File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed
src/widgets/dock_area/show Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 11# egui_dock changelog
22
3+ ## egui_dock 0.18.0 - unreleased
4+
5+ ### Changed
6+
7+ - Node separators are always clamped between their bounds. ([ #289 ] ( https://github.com/Adanos020/egui_dock/pull/289 ) )
8+
39## egui_dock 0.17.0 - 2025/07/13
410
511### Breaking changes
Original file line number Diff line number Diff line change @@ -565,20 +565,12 @@ impl<Tab> DockArea<'_, Tab> {
565565 // Update 'fraction' interaction after drawing separator,
566566 // otherwise it may overlap on other separator / bodies when
567567 // shrunk fast.
568- if let Some ( pos) = response. interact_pointer_pos( ) . or( arrow_key_offset. map( |v| separator. center( ) + v) ) {
569- let dim_point = pos. dim_point;
570- let delta = arrow_key_offset. unwrap_or( response. drag_delta( ) ) . dim_point;
571-
572- if ( delta > 0. && dim_point > midpoint && dim_point < rect. max. dim_point)
573- || ( delta < 0. && dim_point < midpoint && dim_point > rect. min. dim_point)
574- {
575- let range = rect. max. dim_point - rect. min. dim_point;
576- let min = ( style. separator. extra / range) . min( 1.0 ) ;
577- let max = 1.0 - min;
578- let ( min, max) = ( min. min( max) , max. max( min) ) ;
579- split. fraction = ( split. fraction + delta / range) . clamp( min, max) ;
580- }
581- }
568+ let range = rect. max. dim_point - rect. min. dim_point;
569+ let min = ( style. separator. extra / range) . min( 1.0 ) ;
570+ let max = 1.0 - min;
571+ let ( min, max) = ( min. min( max) , max. max( min) ) ;
572+ let delta = arrow_key_offset. unwrap_or( response. drag_delta( ) ) . dim_point;
573+ split. fraction = ( split. fraction + delta / range) . clamp( min, max) ;
582574
583575 if response. double_clicked( ) {
584576 split. fraction = 0.5 ;
You can’t perform that action at this time.
0 commit comments