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

Function _renderClearProps

esm/CSSPlugin.js:564–609  ·  view source on GitHub ↗
(ratio, data)

Source from the content-addressed store, hash-verified

562 return split.join(" ");
563},
564 _renderClearProps = function _renderClearProps(ratio, data) {
565 if (data.tween && data.tween._time === data.tween._dur) {
566 var target = data.t,
567 style = target.style,
568 props = data.u,
569 cache = target._gsap,
570 prop,
571 clearTransforms,
572 i;
573
574 if (props === "all" || props === true) {
575 style.cssText = "";
576 clearTransforms = 1;
577 } else {
578 props = props.split(",");
579 i = props.length;
580
581 while (--i > -1) {
582 prop = props[i];
583
584 if (_transformProps[prop]) {
585 clearTransforms = 1;
586 prop = prop === "transformOrigin" ? _transformOriginProp : _transformProp;
587 }
588
589 _removeProperty(target, prop);
590 }
591 }
592
593 if (clearTransforms) {
594 _removeProperty(target, _transformProp);
595
596 if (cache) {
597 cache.svg && target.removeAttribute("transform");
598 style.scale = style.rotate = style.translate = "none";
599
600 _parseTransform(target, 1); // force all the cached values back to "normal"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values.
601
602
603 cache.uncache = 1;
604
605 _removeIndependentTransforms(style);
606 }
607 }
608 }
609},
610 // note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list.
611_specialProps = {
612 clearProps: function clearProps(plugin, target, property, endValue, tween) {

Callers

nothing calls this directly

Calls 4

_removePropertyFunction · 0.70
_parseTransformFunction · 0.70
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…