Skip to content

Commit

Permalink
Allow Plot::link_cursor to accept impl Into<Vec2b>
Browse files Browse the repository at this point in the history
Updates the `link` argument to the `impl Into<Vec2b>` to be
consistent with `link_axis`. This makes it slightly cleaner
to use.
  • Loading branch information
jetuk committed Jan 8, 2025
1 parent 4a16b88 commit e6d6a6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions egui_plot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ impl<'a> Plot<'a> {
/// Add this plot to a cursor link group so that this plot will share the cursor position with other plots
/// in the same group. A plot cannot belong to more than one cursor group.
#[inline]
pub fn link_cursor(mut self, group_id: impl Into<Id>, link: Vec2b) -> Self {
self.linked_cursors = Some((group_id.into(), link));
pub fn link_cursor(mut self, group_id: impl Into<Id>, link: impl Into<Vec2b>) -> Self {
self.linked_cursors = Some((group_id.into(), link.into()));
self
}

Expand Down

0 comments on commit e6d6a6c

Please sign in to comment.