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

Function _convertKeywordsToPercentages

esm/CSSPlugin.js:548–563  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

546 center: "50%"
547},
548 _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) {
549 var split = value.split(" "),
550 x = split[0],
551 y = split[1] || "50%";
552
553 if (x === "top" || x === "bottom" || y === "left" || y === "right") {
554 //the user provided them in the wrong order, so flip them
555 value = x;
556 x = y;
557 y = value;
558 }
559
560 split[0] = _keywordToPercent[x] || x;
561 split[1] = _keywordToPercent[y] || y;
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,

Callers 1

CSSPlugin.jsFile · 0.70

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…