mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Animation Completed handling
This commit is contained in:
parent
af398c72a8
commit
1e4c431a88
|
|
@ -149,13 +149,12 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
if (centerAnimation != null)
|
if (centerAnimation != null)
|
||||||
{
|
{
|
||||||
SetValueInternal(CenterProperty, TargetCenter);
|
|
||||||
UpdateTransform();
|
|
||||||
|
|
||||||
centerAnimation.Completed -= CenterAnimationCompleted;
|
centerAnimation.Completed -= CenterAnimationCompleted;
|
||||||
centerAnimation = null;
|
centerAnimation = null;
|
||||||
|
|
||||||
BeginAnimation(CenterProperty, null);
|
BeginAnimation(CenterProperty, null);
|
||||||
|
SetValueInternal(CenterProperty, TargetCenter);
|
||||||
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -215,13 +214,12 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
if (zoomLevelAnimation != null)
|
if (zoomLevelAnimation != null)
|
||||||
{
|
{
|
||||||
SetValueInternal(ZoomLevelProperty, TargetZoomLevel);
|
|
||||||
UpdateTransform(true);
|
|
||||||
|
|
||||||
zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted;
|
zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted;
|
||||||
zoomLevelAnimation = null;
|
zoomLevelAnimation = null;
|
||||||
|
|
||||||
BeginAnimation(ZoomLevelProperty, null);
|
BeginAnimation(ZoomLevelProperty, null);
|
||||||
|
SetValueInternal(ZoomLevelProperty, TargetZoomLevel);
|
||||||
|
UpdateTransform(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -276,13 +274,12 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
if (headingAnimation != null)
|
if (headingAnimation != null)
|
||||||
{
|
{
|
||||||
SetValueInternal(HeadingProperty, TargetHeading);
|
|
||||||
UpdateTransform();
|
|
||||||
|
|
||||||
headingAnimation.Completed -= HeadingAnimationCompleted;
|
headingAnimation.Completed -= HeadingAnimationCompleted;
|
||||||
headingAnimation = null;
|
headingAnimation = null;
|
||||||
|
|
||||||
BeginAnimation(HeadingProperty, null);
|
BeginAnimation(HeadingProperty, null);
|
||||||
|
SetValueInternal(HeadingProperty, TargetHeading);
|
||||||
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -175,11 +175,11 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
if (centerAnimation != null)
|
if (centerAnimation != null)
|
||||||
{
|
{
|
||||||
SetValueInternal(CenterProperty, TargetCenter);
|
|
||||||
UpdateTransform();
|
|
||||||
|
|
||||||
centerAnimation.Completed -= CenterAnimationCompleted;
|
centerAnimation.Completed -= CenterAnimationCompleted;
|
||||||
centerAnimation = null;
|
centerAnimation = null;
|
||||||
|
|
||||||
|
SetValueInternal(CenterProperty, TargetCenter);
|
||||||
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -270,11 +270,11 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
if (zoomLevelAnimation != null)
|
if (zoomLevelAnimation != null)
|
||||||
{
|
{
|
||||||
SetValueInternal(ZoomLevelProperty, TargetZoomLevel);
|
|
||||||
UpdateTransform(true);
|
|
||||||
|
|
||||||
zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted;
|
zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted;
|
||||||
zoomLevelAnimation = null;
|
zoomLevelAnimation = null;
|
||||||
|
|
||||||
|
SetValueInternal(ZoomLevelProperty, TargetZoomLevel);
|
||||||
|
UpdateTransform(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -346,11 +346,11 @@ namespace MapControl
|
||||||
{
|
{
|
||||||
if (headingAnimation != null)
|
if (headingAnimation != null)
|
||||||
{
|
{
|
||||||
SetValueInternal(HeadingProperty, TargetHeading);
|
|
||||||
UpdateTransform();
|
|
||||||
|
|
||||||
headingAnimation.Completed -= HeadingAnimationCompleted;
|
headingAnimation.Completed -= HeadingAnimationCompleted;
|
||||||
headingAnimation = null;
|
headingAnimation = null;
|
||||||
|
|
||||||
|
SetValueInternal(HeadingProperty, TargetHeading);
|
||||||
|
UpdateTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue