client/webserver/site/src/js/doc.js
/*
   * layoutMetrics gets information about the elements position on the page.
   */
layoutMetrics gets information about the elements position on the page.
layoutMetrics gets information about the elements position on the page .
static layoutMetrics (el) {
    var box = el.getBoundingClientRect()
    var docEl = document.documentElement
    const top = box.top + docEl.scrollTop
    const left = box.left + docEl.scrollLeft
    const w = el.offsetWidth
    const h = el.offsetHeight
    return {
      bodyTop: top,
      bodyLeft: left,
      width: w,
      height: h,
      centerX: left + w / 2,
      centerY: top + h / 2
    }
  }
static layoutMetrics ( el ) { var box = el . getBoundingClientRect ( ) var docEl = document . documentElement const top = box . top + docEl . scrollTop const left = box . left + docEl . scrollLeft const w = el . offsetWidth const h = el . offsetHeight return { bodyTop : top , bodyLeft : left , width : w , height : h , centerX : left + w / 2 , centerY : top + h / 2 } }
layoutMetrics gets information about the elements position on the page.
layoutMetrics gets information about the elements position on the page .