Permalink
Browse files

Merged PR 1271964: Adding TryUpdate*WithAnimation functions for inter…

…action tracker to expression builder

This function was missed in the initial release of Expression Builder

Related work items: #12929788
  • Loading branch information...
Mark Aldham
Mark Aldham committed Jan 4, 2018
1 parent 180569c commit 09f9ae122cb811ecbe0e1216488c7b07749537c7
Showing with 16 additions and 0 deletions.
  1. +16 −0 ExpressionBuilder/ExpressionBuilder/ExpressionBuilder.CompositionExtensions.cs
@@ -6,6 +6,7 @@
namespace ExpressionBuilder
{
using System.Numerics;
using Windows.UI.Composition;
using Windows.UI.Composition.Interactions;
@@ -96,6 +97,21 @@ public static void SetMotion(this InteractionTrackerInertiaMotion modifier, Expr
modifier.Motion = CreateExpressionAnimationFromNode(modifier.Compositor, expressionNode);
}
/// <summary> Tries to update the InteractionTracker's position by applying an animation. </summary>
/// <param name="expressionNode">The root ExpressionNode that represents the ExpressionAnimation to apply to the InteractionTracker's position.</param>
public static void TryUpdatePositionWithAnimation(this InteractionTracker tracker, ExpressionNode expressionNode)
{
tracker.TryUpdatePositionWithAnimation(CreateExpressionAnimationFromNode(tracker.Compositor, expressionNode));
}
/// <summary> Tries to update the InteractionTracker's scale by applying an animation. </summary>
/// <param name="expressionNode">The root ExpressionNode that represents the ExpressionAnimation to apply to the InteractionTracker's scale.</param>
/// <param name="centerPoint">The centerPoint to use when scaling.</param>
public static void TryUpdateScaleWithAnimation(this InteractionTracker tracker, ExpressionNode expressionNode, Vector3 centerPoint)
{
tracker.TryUpdateScaleWithAnimation(CreateExpressionAnimationFromNode(tracker.Compositor, expressionNode), centerPoint);
}
//
// Helper functions

0 comments on commit 09f9ae1

Please sign in to comment.