INNER CODE UNIT · JavaScript

y

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

    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){
    var el = e.target.closest ? e.target.closest('.nm') : null;
    if (el) { if (el !== cur) show(el); }
    else if (cur && !cur.matches(':focus')) hide();
  });
  document.addEventListener('focusin', function(e){
    var el = e.target.closest ? e.target.closest('.nm') : null;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…