From 50f3cbd366a91da7cbae8d91fb5a853282d94f5f 2015-01-27 05:43:31 From: Min RK Date: 2015-01-27 05:43:31 Subject: [PATCH] fix tooltip location put it inside `#site`, so it scrolls with the notebook --- diff --git a/IPython/html/static/notebook/js/tooltip.js b/IPython/html/static/notebook/js/tooltip.js index 18888f5..c29e42a 100644 --- a/IPython/html/static/notebook/js/tooltip.js +++ b/IPython/html/static/notebook/js/tooltip.js @@ -284,18 +284,21 @@ define([ var xinit = (head.left+anchor.left)/2; var xinter = o.left + (xinit - o.left) / w * (w - 450); var posarrowleft = xinit - xinter; + + var left = xinter - 30 + 'px'; + var top = (head.bottom + 10 - $("#header").height()) + 'px'; if (this._hidden === false) { this.tooltip.animate({ - 'left': xinter - 30 + 'px', - 'top': (head.bottom + 10) + 'px' + left: left, + top: top }); } else { this.tooltip.css({ - 'left': xinter - 30 + 'px' + left: left }); this.tooltip.css({ - 'top': (head.bottom + 10) + 'px' + top: top }); } this.arrow.animate({ diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index 64490e6..d84c2b4 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -293,6 +293,8 @@ data-notebook-path="{{notebook_path}}" + + {% endblock %} {% block after_site %} @@ -304,8 +306,6 @@ data-notebook-path="{{notebook_path}}"
- - {% endblock %} {% block script %}