The pointer position in plot coordinates. Independent of whether the pointer is in the plot area.
(&self)
| 1982 | /// The pointer position in plot coordinates. Independent of whether the |
| 1983 | /// pointer is in the plot area. |
| 1984 | pub fn pointer_coordinate(&self) -> Option<PlotPoint> { |
| 1985 | // We need to subtract the drag delta to keep in sync with the frame-delayed |
| 1986 | // screen transform: |
| 1987 | let last_pos = self.ctx().input(|i| i.pointer.latest_pos())? - self.response.drag_delta(); |
| 1988 | let value = self.plot_from_screen(last_pos); |
| 1989 | Some(value) |
| 1990 | } |
| 1991 | |
| 1992 | /// The pointer drag delta in plot coordinates. |
| 1993 | pub fn pointer_coordinate_drag_delta(&self) -> Vec2 { |
no test coverage detected