forked from oxyplot/oxyplot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMouseManipulator.cs
More file actions
43 lines (40 loc) · 1.62 KB
/
Copy pathMouseManipulator.cs
File metadata and controls
43 lines (40 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MouseManipulator.cs" company="OxyPlot">
// Copyright (c) 2014 OxyPlot contributors
// </copyright>
// <summary>
// Provides an abstract base class for manipulators that handles mouse events.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace OxyPlot
{
/// <summary>
/// Provides an abstract base class for manipulators that handles mouse events.
/// </summary>
public abstract class MouseManipulator : PlotManipulator<OxyMouseEventArgs>
{
/// <summary>
/// Initializes a new instance of the <see cref="MouseManipulator" /> class.
/// </summary>
/// <param name="plotView">The plot view.</param>
protected MouseManipulator(IPlotView plotView)
: base(plotView)
{
}
/// <summary>
/// Gets or sets the first position of the manipulation.
/// </summary>
public ScreenPoint StartPosition { get; protected set; }
/// <summary>
/// Occurs when an input device begins a manipulation on the plot.
/// </summary>
/// <param name="e">The <see cref="OxyInputEventArgs" /> instance containing the event data.</param>
public override void Started(OxyMouseEventArgs e)
{
if (this.XAxis == null || this.YAxis == null)
this.AssignAxes(e.Position);
base.Started(e);
this.StartPosition = e.Position;
}
}
}