INNER CODE UNIT · JavaScript

place

ucscGenomeBrowser/kent · src/hg/utils/registryPages/index.js:47

  function place(el){
    var r = el.getBoundingClientRect();
    var t = tip.getBoundingClientRect();
    var x = r.left;
    if (x + t.width > window.innerWidth - 12) x = window.innerWidth - 12 - t.width;
    if (x < 12) x = 12;
    var y = r.bottom + 8;
    if (y + t.height > window.innerHeight - 12) y = r.top - t.height - 8;
    if (y < 12) y = 12;
    tip.style.left = Math.round(x) + 'px';
    tip.style.top  = Math.round(y) + 'px';
  }
  function hide(){
    tip.removeAttribute('data-on');
    tip.setAttribute('aria-hidden','true');
    cur = null;
  }
  document.addEventListener('mouseover', function(e){

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…