MCPcopy
hub / github.com/greensock/GSAP / _getClippedDuration

Function _getClippedDuration

esm/GSDevTools.js:120–135  ·  view source on GitHub ↗
(animation, excludeRootRepeats)

Source from the content-addressed store, hash-verified

118 return a;
119},
120 _getClippedDuration = function _getClippedDuration(animation, excludeRootRepeats) {
121 var max = 0,
122 repeat = Math.max(0, animation._repeat),
123 t = animation._first;
124
125 if (!t) {
126 max = animation.duration();
127 }
128
129 while (t) {
130 max = Math.max(max, t.totalDuration() > 999 ? t.endTime(false) : t._start + t._tDur / t._ts);
131 t = t._next;
132 }
133
134 return !excludeRootRepeats && repeat ? max * (repeat + 1) + animation._rDelay * repeat : max;
135},
136 _globalizeTime = function _globalizeTime(animation, rawTime) {
137 var a = animation,
138 time = arguments.length > 1 ? +rawTime : a.rawTime();

Callers 2

animationFunction · 0.70
updateRootDurationFunction · 0.70

Calls 3

durationMethod · 0.80
endTimeMethod · 0.80
totalDurationMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…