Hide toolbar of rendered text cells.

Raffaele De Feo 12 years ago
parent 5a53a034f4
commit dcf77aa2a0

@ -276,11 +276,11 @@ var IPython = (function (IPython) {
this.inner_element.append(local_div);
}
// If there are no controls hide the toolbar.
if (this.ui_controls_list.length) {
this.show();
} else {
// If there are no controls or the cell is a rendered TextCell hide the toolbar.
if (!this.ui_controls_list.length || (this.cell instanceof IPython.TextCell && this.cell.rendered)) {
this.hide();
} else {
this.show();
}
};

@ -138,6 +138,9 @@ var IPython = (function (IPython) {
}
this.refresh();
}
if (this.celltoolbar.ui_controls_list.length) {
this.celltoolbar.show();
}
return cont;
};
@ -178,6 +181,7 @@ var IPython = (function (IPython) {
*/
TextCell.prototype.set_rendered = function(text) {
this.element.find('div.text_cell_render').html(text);
this.celltoolbar.hide();
};

Loading…
Cancel
Save