mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update Map.WinUI.cs
This commit is contained in:
parent
efc73292ba
commit
eaf3ff05fa
|
|
@ -20,7 +20,6 @@ namespace MapControl
|
||||||
| ManipulationModes.TranslateInertia;
|
| ManipulationModes.TranslateInertia;
|
||||||
|
|
||||||
PointerWheelChanged += OnPointerWheelChanged;
|
PointerWheelChanged += OnPointerWheelChanged;
|
||||||
PointerPressed += OnPointerPressed;
|
|
||||||
PointerMoved += OnPointerMoved;
|
PointerMoved += OnPointerMoved;
|
||||||
ManipulationDelta += OnManipulationDelta;
|
ManipulationDelta += OnManipulationDelta;
|
||||||
ManipulationCompleted += OnManipulationCompleted;
|
ManipulationCompleted += OnManipulationCompleted;
|
||||||
|
|
@ -40,20 +39,8 @@ namespace MapControl
|
||||||
|
|
||||||
private bool? manipulationEnabled;
|
private bool? manipulationEnabled;
|
||||||
|
|
||||||
private void OnPointerPressed(object sender, PointerRoutedEventArgs e)
|
|
||||||
{
|
|
||||||
// Set manipulationEnabled before ManipulationStarted.
|
|
||||||
// IsLeftButtonPressed: input was triggered by the primary action mode of an input device.
|
|
||||||
//
|
|
||||||
manipulationEnabled =
|
|
||||||
e.GetCurrentPoint(this).Properties.IsLeftButtonPressed &&
|
|
||||||
e.KeyModifiers == VirtualKeyModifiers.None;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnPointerMoved(object sender, PointerRoutedEventArgs e)
|
private void OnPointerMoved(object sender, PointerRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
// Set manipulationEnabled before ManipulationStarted when no PointerPressed was received.
|
|
||||||
//
|
|
||||||
if (!manipulationEnabled.HasValue &&
|
if (!manipulationEnabled.HasValue &&
|
||||||
e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue