From 81b20c4de67bad271f848eb2dd492c9da0b43678 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 5 Feb 2010 03:50:24 +0100 Subject: fixed linenumber height if first line in source has a margin --- infrastructure/ace/www/ace2_inner.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'infrastructure/ace/www') diff --git a/infrastructure/ace/www/ace2_inner.js b/infrastructure/ace/www/ace2_inner.js index 6723cef..a6233d3 100644 --- a/infrastructure/ace/www/ace2_inner.js +++ b/infrastructure/ace/www/ace2_inner.js @@ -4778,6 +4778,11 @@ function OUTER(gscope) { a = a.nextSibling; b = b.nextSibling; } + + // fix if first line has margin (f.e. h1 in first line) + sideDivInner.firstChild.style.marginTop = + (doc.body.firstChild.offsetTop - sideDivInner.firstChild.offsetTop + + parseInt(sideDivInner.firstChild.style.marginTop + "0")) + "px"; } } -- cgit v1.2.3