From b566c272717236a1426fccbe793195d7485a202d Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sat, 27 Dec 2014 16:39:53 +0000 Subject: [PATCH] Remove item scroll hack, and fix card overlap. Fixes #364. --- resources/report/js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/report/js/script.js b/resources/report/js/script.js index 6fb6af6b..bdd85180 100644 --- a/resources/report/js/script.js +++ b/resources/report/js/script.js @@ -502,6 +502,8 @@ function updateMasterlistNoProgress() { } } }); + /* Hack to stop cards overlapping. */ + document.getElementById('main').lastElementChild.updateSize(); toast('Masterlist updated to revision ' + loot.game.masterlist.revision + '.'); } else { @@ -985,8 +987,6 @@ function handleSidebarClick(evt) { if (evt.target.hasAttribute('data-index')) { window.location.hash = ''; document.getElementById('main').lastElementChild.scrollToItem(evt.target.getAttribute('data-index')); - /* However, the scroll bar that the plugin card list uses is for the whole main content area, so the position is offset by the heights of the summary and general messages cards. Adjust to compensate. */ - document.getElementById('main').scrollTop += document.getElementById('main').lastElementChild.offsetTop; if (evt.type == 'dblclick') { document.getElementById(evt.target.getAttribute('data-id')).onShowEditor();