Bug 1261561 - Part 1: Fix TimeScale.getAnimationDimensions() to handle multiple iterations r?pbro
MozReview-Commit-ID: FUjebmapYH1
--- a/devtools/client/animationinspector/utils.js
+++ b/devtools/client/animationinspector/utils.js
@@ -323,17 +323,18 @@ var TimeScale = {
let delayX = delay < 0 ? x : this.startTimeToDistance(start);
// The width of the delay.
let delayW = this.durationToDistance(Math.abs(delay) / rate);
// The width of the delay if it is negative, 0 otherwise.
let negativeDelayW = delay < 0 ? delayW : 0;
// The width of the endDelay.
let endDelayW = this.durationToDistance(Math.abs(endDelay) / rate);
// The start position of the endDelay.
- let endDelayX = endDelay < 0 ? x + w - endDelayW : x + w;
+ let endDelayX = endDelay < 0 ? x + iterationW - endDelayW
+ : x + iterationW;
return {x, w, iterationW, delayX, delayW, negativeDelayW,
endDelayX, endDelayW};
},
/**
* Given an animation, get the background data for .iterations element.
* This background represents iterationCount and iterationStart.