diff --git a/src/panels/marginal.js b/src/panels/marginal.js index da30e37..204c690 100644 --- a/src/panels/marginal.js +++ b/src/panels/marginal.js @@ -39,8 +39,10 @@ Monocle.Panels.Marginal = function (flipper, evtCallbacks) { var sheaf = page.m.sheafDiv; var bw = sheaf.offsetLeft; var fw = page.offsetWidth - (sheaf.offsetLeft + sheaf.offsetWidth); - bw = Math.floor(((bw - 2) / page.offsetWidth) * 10000 / 100 ) + "%"; - fw = Math.floor(((fw - 2) / page.offsetWidth) * 10000 / 100 ) + "%"; + bw = Math.round(((bw - 2) / page.offsetWidth) * 10000 / 100 ); + fw = Math.round(((fw - 2) / page.offsetWidth) * 10000 / 100 ); + bw = Math.max(bw, 5) + "%"; + fw = Math.max(fw, 5) + "%"; p.panels.forwards.properties.div.style.width = fw; p.panels.backwards.properties.div.style.width = bw; }