diff --git a/devtools/client/animationinspector/components/animation-time-block.js b/devtools/client/animationinspector/components/animation-time-block.js index b1e28351033a..65c9e78aef55 100644 --- a/devtools/client/animationinspector/components/animation-time-block.js +++ b/devtools/client/animationinspector/components/animation-time-block.js @@ -68,12 +68,9 @@ AnimationTimeBlock.prototype = { // Create a container element to hold the delay and iterations. // It is positioned according to its delay (divided by the playbackrate), // and its width is according to its duration (divided by the playbackrate). - let {x, iterationW, delayX, delayW, negativeDelayW, endDelayX, endDelayW} = + const {x, delayX, delayW, endDelayX, endDelayW} = TimeScale.getAnimationDimensions(animation); - // background properties for .iterations element - let backgroundIterations = TimeScale.getIterationsBackgroundData(animation); - // Animation summary graph element. const summaryEl = createNode({ parent: this.containerEl, diff --git a/devtools/client/animationinspector/utils.js b/devtools/client/animationinspector/utils.js index 2ab956ebb99f..45ebab00d2a3 100644 --- a/devtools/client/animationinspector/utils.js +++ b/devtools/client/animationinspector/utils.js @@ -268,31 +268,6 @@ var TimeScale = { 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. - * Returns three properties. - * 1. size: x of background-size (%) - * 2. position: x of background-position (%) - * 3. repeat: background-repeat (string) - */ - getIterationsBackgroundData: function ({state}) { - let iterationCount = state.iterationCount || 1; - let iterationStartW = state.iterationStart % 1 * 100; - let background = {}; - if (iterationCount == 1) { - background.size = 100 - iterationStartW; - background.position = 0; - background.repeat = "no-repeat"; - } else { - background.size = 1 / iterationCount * 100; - background.position = -iterationStartW * background.size / - (100 - background.size); - background.repeat = "repeat-x"; - } - return background; } };