mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 06:26:41 +00:00
Input handling in Avalonia Map and MapItem
This commit is contained in:
parent
f2d82e910b
commit
1bb03e1102
3 changed files with 22 additions and 20 deletions
|
|
@ -72,15 +72,20 @@ namespace MapControl
|
|||
{
|
||||
HandleManipulation(point.Pointer, point.Position);
|
||||
}
|
||||
else if (point.Pointer.Type == PointerType.Mouse || ManipulationModes.HasFlag(ManipulationModes.Translate))
|
||||
else if (point.Pointer.Type == PointerType.Mouse ||
|
||||
ManipulationModes.HasFlag(ManipulationModes.Translate))
|
||||
{
|
||||
TranslateMap(new Point(point.Position.X - position1.X, point.Position.Y - position1.Y));
|
||||
position1 = point.Position;
|
||||
}
|
||||
}
|
||||
else if (
|
||||
pointer1 == null && point.Pointer.Type == PointerType.Mouse && point.Properties.IsLeftButtonPressed && e.KeyModifiers == KeyModifiers.None ||
|
||||
pointer2 == null && point.Pointer.Type == PointerType.Touch && ManipulationModes != ManipulationModes.None)
|
||||
else if (pointer1 == null &&
|
||||
point.Pointer.Type == PointerType.Mouse &&
|
||||
point.Properties.IsLeftButtonPressed &&
|
||||
e.KeyModifiers == KeyModifiers.None ||
|
||||
pointer2 == null &&
|
||||
point.Pointer.Type == PointerType.Touch &&
|
||||
ManipulationModes != ManipulationModes.None)
|
||||
{
|
||||
point.Pointer.Capture(this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue