fix(animations): throw errors and normalize offset beyond the range of [0,1]

Closes #13348
Closes #13440
This commit is contained in:
Matias Niemelä
2016-12-12 15:22:16 -08:00
committed by Victor Berchet
parent 8395f0e138
commit b56474d067
4 changed files with 76 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export class WebAnimationsDriver implements AnimationDriver {
keyframes.forEach((keyframe: AnimationKeyframe) => {
const data = _populateStyles(keyframe.styles, startingStyleLookup);
data['offset'] = keyframe.offset;
data['offset'] = Math.max(0, Math.min(1, keyframe.offset));
formattedSteps.push(data);
});