Fix PaneGrid mouse interaction when clicking a pane

This commit is contained in:
Héctor Ramón Jiménez 2024-02-27 02:19:41 +01:00
parent 8bb1587a74
commit c723c101d4
No known key found for this signature in database
GPG key ID: 0BF4EC06CD8E5686
2 changed files with 60 additions and 100 deletions

View file

@ -403,15 +403,6 @@ pub enum Action {
///
/// [`PaneGrid`]: super::PaneGrid
Idle,
/// A [`Pane`] in the [`PaneGrid`] is being clicked.
///
/// [`PaneGrid`]: super::PaneGrid
Clicking {
/// The [`Pane`] being clicked.
pane: Pane,
/// The starting [`Point`] of the click interaction.
origin: Point,
},
/// A [`Pane`] in the [`PaneGrid`] is being dragged.
///
/// [`PaneGrid`]: super::PaneGrid
@ -441,14 +432,6 @@ impl Action {
}
}
/// Returns the current [`Pane`] that is being clicked, if any.
pub fn clicked_pane(&self) -> Option<(Pane, Point)> {
match *self {
Action::Clicking { pane, origin, .. } => Some((pane, origin)),
_ => None,
}
}
/// Returns the current [`Split`] that is being dragged, if any.
pub fn picked_split(&self) -> Option<(Split, Axis)> {
match *self {