Browse Source
Partially revert Transition interpolation clamp.
pull/2517/head
Jumar Macato
8 years ago
No known key found for this signature in database
GPG Key ID: B19884DAC3A5BF3F
1 changed files with
1 additions and
7 deletions
-
src/Avalonia.Animation/TransitionInstance.cs
|
|
|
@ -31,17 +31,11 @@ namespace Avalonia.Animation |
|
|
|
var interpVal = (double)t.Ticks / _duration.Ticks; |
|
|
|
|
|
|
|
// Clamp interpolation value.
|
|
|
|
if (interpVal >= 1d) |
|
|
|
if (interpVal >= 1d | (interpVal < 0d)) |
|
|
|
{ |
|
|
|
PublishNext(1d); |
|
|
|
PublishCompleted(); |
|
|
|
} |
|
|
|
// Cut-off when interpolation value is negative.
|
|
|
|
else if (interpVal < 0d) |
|
|
|
{ |
|
|
|
PublishNext(0d); |
|
|
|
PublishCompleted(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
PublishNext(interpVal); |
|
|
|
|