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

Function _getBounds

esm/ScrollTrigger.js:180–196  ·  view source on GitHub ↗
(element, withoutTransforms)

Source from the content-addressed store, hash-verified

178 return obj;
179},
180 _getBounds = function _getBounds(element, withoutTransforms) {
181 var tween = withoutTransforms && _getComputedStyle(element)[_transformProp] !== "matrix(1, 0, 0, 1, 0, 0)" && gsap.to(element, {
182 x: 0,
183 y: 0,
184 xPercent: 0,
185 yPercent: 0,
186 rotation: 0,
187 rotationX: 0,
188 rotationY: 0,
189 scale: 1,
190 skewX: 0,
191 skewY: 0
192 }).progress(1),
193 bounds = element.getBoundingClientRect ? element.getBoundingClientRect() : element.scrollingElement.getBoundingClientRect();
194 tween && tween.progress(0).kill();
195 return bounds;
196},
197 _getSize = function _getSize(element, _ref3) {
198 var d2 = _ref3.d2;
199 return element["offset" + d2] || element["client" + d2] || 0;

Callers 3

_getBoundsFuncFunction · 0.70
_parsePositionFunction · 0.70
ScrollTrigger.jsFile · 0.70

Calls 5

getBoundingClientRectMethod · 0.80
_getComputedStyleFunction · 0.70
killMethod · 0.65
progressMethod · 0.45
toMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…