fix #1614 Gutter tooltip not showing inside relative container

This commit is contained in:
nightwing 2013-09-21 14:55:53 +04:00
commit 58e1410adf

View file

@ -113,11 +113,12 @@ function GutterHandler(mouseHandler) {
var rect = editor.renderer.$gutter.getBoundingClientRect();
tooltip.style.left = e.x + 15 + "px";
if (e.y + 3 * editor.renderer.lineHeight + 15 < rect.bottom) {
tooltip.style.bottom = "";
tooltip.style.bottom = "";
tooltip.style.top = e.y + 15 + "px";
} else {
tooltip.style.top = "";
tooltip.style.bottom = rect.bottom - e.y + 5 + "px";
tooltip.style.top = "";
var innerHeight = window.innerHeight || document.documentElement.clientHeight;
tooltip.style.bottom = innerHeight - e.y + 5 + "px";
}
}