diff --git a/samples/AvaloniaDemo/MainWindow.axaml b/samples/AvaloniaDemo/MainWindow.axaml index 2d7d588..186ac1d 100644 --- a/samples/AvaloniaDemo/MainWindow.axaml +++ b/samples/AvaloniaDemo/MainWindow.axaml @@ -108,16 +108,16 @@ HorizontalScrollBarVisibility="Auto"> - - - - - + + + + + @@ -149,16 +149,16 @@ HorizontalScrollBarVisibility="Auto"> - - - - - + + + + + diff --git a/src/Avalonia.Controls.PanAndZoom/TransformOperationsTransition.cs b/src/Avalonia.Controls.PanAndZoom/TransformOperationsTransition.cs deleted file mode 100644 index 76dfe76..0000000 --- a/src/Avalonia.Controls.PanAndZoom/TransformOperationsTransition.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Reactive.Linq; -using Avalonia.Animation; -using Avalonia.Media; -using Avalonia.Media.Transformation; - -namespace Avalonia.Controls.PanAndZoom -{ - /// - /// Defines how a TransformOperations property should be animated. - /// - /// - /// Workaround for https://github.com/AvaloniaUI/Avalonia/issues/6494 - /// - public class TransformOperationsTransition : Transition - { - /// - public override IObservable DoTransition(IObservable progress, ITransform oldValue, ITransform newValue) - { - return progress.Select(p => - { - var f = Easing.Ease(p); - var builder = new TransformOperations.Builder(1); - var matrix1 = (oldValue as TransformOperations)?.Value ?? Matrix.Identity; - var matrix2 = (newValue as TransformOperations)?.Value ?? Matrix.Identity; - var result = new Matrix( - matrix1.M11 + (matrix2.M11 - matrix1.M11) * f, - matrix1.M12 + (matrix2.M12 - matrix1.M12) * f, - matrix1.M21 + (matrix2.M21 - matrix1.M21) * f, - matrix1.M22 + (matrix2.M22 - matrix1.M22) * f, - matrix1.M31 + (matrix2.M31 - matrix1.M31) * f, - matrix1.M32 + (matrix2.M32 - matrix1.M32) * f); - - builder.AppendMatrix(result); - - return builder.Build(); - }); - } - } -}