-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
Features Suggestion
Feature description:
The mouse interaction for dragable plottables should take the axis index into account. Currently it seems to call
/// <summary>
/// Return the X position (in coordinate space) for the given pixel column
/// </summary>
/// <param name="xPixel">horizontal pixel location</param>
/// <returns>horizontal position in coordinate space</returns>
public double GetCoordinateX(float xPixel) => settings.XAxis.Dims.GetUnit(xPixel);
/// <summary>
/// Return the Y position (in coordinate space) for the given pixel row
/// </summary>
/// <param name="yPixel">vertical pixel location</param>
/// <returns>vertical position in coordinate space</returns>
public double GetCoordinateY(float yPixe) => settings.XAxis.Dims.GetUnit(yPixel);Which only works if everything happens on the first axis (X and/or Y). If the plottable is on another set of axes, the IsUnderMouse and DragTo methods fail because the coordinates are wrong.
A short term patch could be to consider the second axes too with e.g.
/// <summary>
/// Return the X position (in coordinate space) for the given pixel column
/// </summary>
/// <param name="xPixel">horizontal pixel location</param>
/// <returns>horizontal position in coordinate space</returns>
public double GetCoordinateX(float xPixel,int axisindex = 0) => axisindex == 0 ? settings.XAxis.Dims.GetUnit(xPixel) : settings.XAxis2.Dims.GetUnit(xPixel);
/// <summary>
/// Return the Y position (in coordinate space) for the given pixel row
/// </summary>
/// <param name="yPixel">vertical pixel location</param>
/// <returns>vertical position in coordinate space</returns>
public double GetCoordinateY(float yPixel,int axisindex = 0) => axisindex == 0 ? settings.XAxis.Dims.GetUnit(yPixel) : settings.YAxis2.Dims.GetUnit(yPixel);If one adds other axes I am not sure how to retrieve the current one...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels