MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / coordsFromSel

Function coordsFromSel

scripts/bot.js:391–394  ·  view source on GitHub ↗
(sel)

Source from the content-addressed store, hash-verified

389 }
390
391 function coordsFromSel(sel) {
392 var bounds = sel.node().getBoundingClientRect();
393 return [bounds.left + bounds.width/2, bounds.top + bounds.height/2];
394 }
395
396 function isVisible(el) {
397 var elemTop = el.getBoundingClientRect().top;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected