fix tooltip location

put it inside `#site`, so it scrolls with the notebook
This commit is contained in:
Min RK 2015-01-26 21:43:31 -08:00
parent e18a502484
commit a1e4775487
2 changed files with 9 additions and 6 deletions

View File

@ -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({

View File

@ -293,6 +293,8 @@ data-notebook-path="{{notebook_path}}"
</div>
</div>
<div id='tooltip' class='ipython_tooltip' style='display:none'></div>
{% endblock %}
{% block after_site %}
@ -304,8 +306,6 @@ data-notebook-path="{{notebook_path}}"
<div id='pager-button-area'></div>
</div>
<div id='tooltip' class='ipython_tooltip' style='display:none'></div>
{% endblock %}
{% block script %}