mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
MoveMap method with higher accuracy
This commit is contained in:
parent
94b6d47c4d
commit
caa25cb471
4 changed files with 54 additions and 23 deletions
|
|
@ -74,6 +74,7 @@ namespace MapControl
|
|||
point.Pointer.Type == PointerType.Touch && HandleTouchPressed(point))
|
||||
{
|
||||
point.Pointer.Capture(this);
|
||||
SetTransformCenter(point.Position);
|
||||
}
|
||||
|
||||
base.OnPointerPressed(e);
|
||||
|
|
@ -83,6 +84,7 @@ namespace MapControl
|
|||
{
|
||||
if (HandlePointerReleased(e.Pointer))
|
||||
{
|
||||
EndMoveMap();
|
||||
e.Pointer.Capture(null);
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +93,10 @@ namespace MapControl
|
|||
|
||||
protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e)
|
||||
{
|
||||
HandlePointerReleased(e.Pointer);
|
||||
if (HandlePointerReleased(e.Pointer))
|
||||
{
|
||||
EndMoveMap();
|
||||
}
|
||||
|
||||
base.OnPointerCaptureLost(e);
|
||||
}
|
||||
|
|
@ -108,8 +113,8 @@ namespace MapControl
|
|||
}
|
||||
else if (e.Pointer.Type == PointerType.Mouse || ManipulationModes.HasFlag(ManipulationModes.Translate))
|
||||
{
|
||||
TranslateMap(position - position1);
|
||||
position1 = position;
|
||||
MoveMap(position);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue