mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +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
|
|
@ -57,15 +57,16 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
internal void UpdateSelection(MapItem mapItem, bool controlKeyPressed, bool shiftKeyPressed)
|
||||
internal void UpdateSelection(MapItem mapItem, PointerEventArgs e)
|
||||
{
|
||||
if (SelectionMode != SelectionMode.Single && shiftKeyPressed)
|
||||
if (SelectionMode != SelectionMode.Single &&
|
||||
e.KeyModifiers.HasFlag(KeyModifiers.Shift))
|
||||
{
|
||||
SelectItemsInRange(mapItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateSelection(mapItem, true, false, controlKeyPressed);
|
||||
UpdateSelection(mapItem, true, false, e.KeyModifiers.HasFlag(KeyModifiers.Control));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue