MCPcopy Index your code
hub / github.com/zeman/perfmap / getCumulativeOffset

Function getCumulativeOffset

perfmap.js:133–150  ·  view source on GitHub ↗
(obj, url)

Source from the content-addressed store, hash-verified

131}
132
133function getCumulativeOffset(obj, url) {
134 var left, top;
135 left = top = 0;
136 if (obj.offsetParent) {
137 do {
138 left += obj.offsetLeft;
139 top += obj.offsetTop;
140 } while (obj = obj.offsetParent);
141 }
142 if ( 0 == top ) {
143 left += gZeroLeft;
144 top += gZeroTop;
145 }
146 return {
147 left: left,
148 top: top,
149 };
150}
151
152// give visual feedback asap
153var loading = document.createElement("div");

Callers 1

findImagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected