Skip to content

portal_detail_display

johnd0e edited this page Sep 11, 2019 · 2 revisions

Used in code

window.resetScrollOnNewPortal (introduced by #43)

window.renderPortalDetails.lastVisible should not be exposed

var lastVisible;
window.resetScrollOnNewPortal = function (isVisible) { // optional
  if (selectedPortal !== lastVisible) {
    // another portal selected so scroll position become irrelevant to new portal details
    if (isVisible || $('#sidebar').is(':visible')) {
      $("#sidebar").scrollTop(0); // NB: this works ONLY when #sidebar:visible
      lastVisible = selectedPortal;
    }
  }
};
window.renderPortalDetails = function(guid) {
  selectPortal(window.portals[guid] ? guid : null);
  window.resetScrollOnNewPortal();
//todo
Clone this wiki locally