mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
almost all logic in tooltip.js, padding right button
This commit is contained in:
parent
ca68062413
commit
5d8f0da694
@ -11,6 +11,11 @@
|
||||
*
|
||||
* it it's a less file, don't forget to recompile it
|
||||
*/
|
||||
/*
|
||||
* We'll try to get something prety, so we
|
||||
* have some strange ccs to have the scroll bar on
|
||||
* the left of the left with fix button on the top right of the tooltip
|
||||
*/
|
||||
@-moz-keyframes fadeOut {
|
||||
from {
|
||||
opacity: 1;
|
||||
@ -75,6 +80,11 @@
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
.tooltiptext {
|
||||
/*avoid the button to overlap on some docstring*/
|
||||
|
||||
padding-right: 30px;
|
||||
}
|
||||
.tooltip {
|
||||
max-width: 700px;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
|
@ -59,8 +59,10 @@ var IPython = (function (IPython) {
|
||||
if (pre_cursor === "" || pre_cursor === "(" ) {
|
||||
// don't do anything if line beggin with '(' or is empty
|
||||
} else {
|
||||
// Will set a timer to request tooltip in `time`
|
||||
IPython.tooltip.pending(that, pre_cursor)
|
||||
if(time ==0)
|
||||
{ IPython.tooltip.request(that, pre_cursor) }
|
||||
else
|
||||
{ IPython.tooltip.pending(that, pre_cursor) }
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -128,7 +128,7 @@ var IPython = (function (IPython) {
|
||||
Tooltip.prototype.pending = function(cell,text)
|
||||
{
|
||||
var that = this;
|
||||
this.timeout = setTimeout(function(){that.request(cell, text)} , IPython.notebook.time_before_tooltip);
|
||||
this.tooltip_timeout = setTimeout(function(){that.request(cell, text)} , IPython.notebook.time_before_tooltip);
|
||||
}
|
||||
Tooltip.prototype.request = function(cell,text)
|
||||
{
|
||||
@ -179,11 +179,11 @@ var IPython = (function (IPython) {
|
||||
this.text.append(defstring_html);
|
||||
}
|
||||
this.text.append(pre);
|
||||
// keep scroll top to be sure to always see the first line
|
||||
this.text.scrollTop(0);
|
||||
// keep scroll top to be sure to always see the first line
|
||||
this.text.scrollTop(0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Tooltip.prototype.showInPager = function(){
|
||||
var msg_id = IPython.notebook.kernel.execute(name+"?");
|
||||
|
@ -12,7 +12,13 @@
|
||||
*
|
||||
* it it's a less file, don't forget to recompile it
|
||||
*/
|
||||
/*
|
||||
* We'll try to get something prety, so we
|
||||
* have some strange ccs to have the scroll bar on
|
||||
* the left of the left with fix button on the top right of the tooltip
|
||||
*/
|
||||
|
||||
// double slash comment are remove by less compilation
|
||||
// **
|
||||
// * Less mixins
|
||||
// **/
|
||||
@ -111,7 +117,9 @@
|
||||
right:0px;
|
||||
}
|
||||
.tooltiptext
|
||||
{
|
||||
{
|
||||
/*avoid the button to overlap on some docstring*/
|
||||
padding-right:30px
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
|
Loading…
Reference in New Issue
Block a user