mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-06 11:35:24 +08:00
call tooltip after time
This commit is contained in:
parent
0bfa18dd46
commit
ca68062413
@ -60,9 +60,7 @@ var IPython = (function (IPython) {
|
||||
// don't do anything if line beggin with '(' or is empty
|
||||
} else {
|
||||
// Will set a timer to request tooltip in `time`
|
||||
that.tooltip_timeout = setTimeout(function(){
|
||||
IPython.tooltip.request(that, pre_cursor)
|
||||
},time);
|
||||
IPython.tooltip.pending(that, pre_cursor)
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -118,13 +118,18 @@ var IPython = (function (IPython) {
|
||||
// note that we don't handle closing directly inside the calltip
|
||||
// as in the completer, because it is not focusable, so won't
|
||||
// get the event.
|
||||
this.hide();
|
||||
this.hide();
|
||||
if (this.tooltip_timeout != null){
|
||||
clearTimeout(this.tooltip_timeout);
|
||||
this.tooltip_timeout = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Tooltip.prototype.pending = function(cell,text)
|
||||
{
|
||||
var that = this;
|
||||
this.timeout = setTimeout(function(){that.request(cell, text)} , IPython.notebook.time_before_tooltip);
|
||||
}
|
||||
Tooltip.prototype.request = function(cell,text)
|
||||
{
|
||||
IPython.notebook.request_tool_tip(cell, text);
|
||||
|
Loading…
Reference in New Issue
Block a user