mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Allow manipulation only without modifier keys
This commit is contained in:
parent
e1c6bfdf9c
commit
42f824bcf4
|
|
@ -72,7 +72,7 @@ namespace MapControl
|
|||
|
||||
private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (CaptureMouse())
|
||||
if (Keyboard.Modifiers == ModifierKeys.None && CaptureMouse())
|
||||
{
|
||||
mousePosition = e.GetPosition(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using Windows.System;
|
||||
#if WINUI
|
||||
using Microsoft.UI.Input;
|
||||
using Microsoft.UI.Xaml;
|
||||
|
|
@ -61,6 +62,7 @@ namespace MapControl
|
|||
private void OnPointerPressed(object sender, PointerRoutedEventArgs e)
|
||||
{
|
||||
manipulationEnabled = e.Pointer.PointerDeviceType != PointerDeviceType.Mouse ||
|
||||
e.KeyModifiers == VirtualKeyModifiers.None &&
|
||||
e.GetCurrentPoint(this).Properties.IsLeftButtonPressed;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue