mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Couple of whiteboard logic implementation misses
This commit is contained in:
parent
d5e112dce0
commit
a6f883d7f2
@ -402,14 +402,6 @@ var IPython = (function (IPython) {
|
||||
return false;
|
||||
};
|
||||
|
||||
CodeCell.prototype.edit_mode = function (focus_editor) {
|
||||
var cont = IPython.Cell.prototype.edit_mode.apply(this);
|
||||
if (cont && focus_editor) {
|
||||
this.focus_editor();
|
||||
}
|
||||
return cont;
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine whether or not the unfocus event should be aknowledged.
|
||||
*
|
||||
|
@ -554,7 +554,7 @@ var IPython = (function (IPython) {
|
||||
// Set the cell to edit mode and notify the keyboard manager if this
|
||||
// is a change of mode for the notebook as a whole.
|
||||
if (this.mode !== 'edit') {
|
||||
cell.edit_mode(focus_editor);
|
||||
cell.edit_mode();
|
||||
this.mode = 'edit';
|
||||
$([IPython.events]).trigger('edit_mode.Notebook');
|
||||
IPython.keyboard_manager.edit_mode();
|
||||
|
@ -206,20 +206,6 @@ var IPython = (function (IPython) {
|
||||
this.render();
|
||||
};
|
||||
|
||||
TextCell.prototype.edit_mode = function (focus_editor) {
|
||||
var cont = IPython.Cell.prototype.edit_mode.apply(this);
|
||||
if (cont) {
|
||||
cont = this.unrender();
|
||||
// Focus the editor if codemirror was just added to the page or the
|
||||
// caller explicitly wants to focus the editor (usally when the
|
||||
// edit_mode was triggered by something other than a mouse click).
|
||||
if (cont || focus_editor) {
|
||||
this.focus_editor();
|
||||
}
|
||||
}
|
||||
return cont;
|
||||
};
|
||||
|
||||
/**
|
||||
* setter: {{#crossLink "TextCell/set_text"}}{{/crossLink}}
|
||||
* @method get_text
|
||||
|
Loading…
Reference in New Issue
Block a user