From 915f63cac483abeb54a7a1020b07fa7223e33f1f Mon Sep 17 00:00:00 2001 From: simonzack Date: Mon, 26 Jan 2015 02:47:11 +1100 Subject: [PATCH] pixel tweaks so the left scrollbar is selectable and the viewport takes the whole page --- .../public/gollum/livepreview/js/livepreview.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/gollum/public/gollum/livepreview/js/livepreview.js b/lib/gollum/public/gollum/livepreview/js/livepreview.js index f7e352ae..15fe092c 100644 --- a/lib/gollum/public/gollum/livepreview/js/livepreview.js +++ b/lib/gollum/public/gollum/livepreview/js/livepreview.js @@ -453,18 +453,16 @@ var applyTimeout = function () { var height = $( win ).height(); var heightHalf = height / 2; - // height minus 50 so the end of document text doesn't flow off the page. - // + 15 for scroll bar - var editorContainerStyle = 'width:' + (widthHalf + 15) + 'px;' + - 'height:' + (height - 50) + 'px;' + + // height minus 40 so the end of document text doesn't flow off the page. + var editorContainerStyle = 'width:' + widthHalf + 'px;' + + 'height:' + (height - 40) + 'px;' + 'left:' + (leftRight === false ? widthHalf + 'px;' : '0px;') + 'top:' + '40px;'; // use 40px for tool menu cssSet( editorContainer, editorContainerStyle ); editor.resize(); - // width -2 for scroll bar & -10 for left offset - var previewStyle = 'width:' + (widthHalf - 2 - 10) + 'px;' + - 'height:' + (height -50) + 'px;' + + var previewStyle = 'width:' + widthHalf + 'px;' + + 'height:' + (height - 40) + 'px;' + 'left:' + (leftRight === false ? '10px;' : widthHalf + 'px;') + // preview panel top is equal to height of comment tool panel (40px) + 1 'top:41px;';