NegativeEndDelayPath.js (883B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js"); 8 9 const NegativePath = require("resource://devtools/client/inspector/animation/components/graph/NegativePath.js"); 10 11 class NegativeEndDelayPath extends NegativePath { 12 getClassName() { 13 return "animation-negative-end-delay-path"; 14 } 15 16 renderGraph(state, helper) { 17 const endTime = state.delay + state.iterationCount * state.duration; 18 const startTime = endTime + state.endDelay; 19 const segments = helper.createPathSegments(startTime, endTime); 20 21 return dom.path({ 22 d: helper.toPathString(segments), 23 }); 24 } 25 } 26 27 module.exports = NegativeEndDelayPath;