restore collapsed state for cells

js refactor removed this, but did not document the change.  This restores it, but it would be fine to revert this and update the docs instead.
This commit is contained in:
MinRK 2012-06-12 19:13:30 -07:00
parent 362feaa295
commit ec50e94524

View File

@ -22,6 +22,7 @@ var IPython = (function (IPython) {
this.code_mirror = null;
this.input_prompt_number = null;
this.tooltip_on_tab = true;
this.collapsed = false;
IPython.Cell.apply(this, arguments);
};
@ -200,17 +201,20 @@ var IPython = (function (IPython) {
CodeCell.prototype.collapse = function () {
this.output_area.collapse();
this.collapsed = true;
this.output_area.collapse();
};
CodeCell.prototype.expand = function () {
this.output_area.expand();
this.collapsed = false;
this.output_area.expand();
};
CodeCell.prototype.toggle_output = function () {
this.output_area.toggle_output();
this.collapsed = Boolean(1 - this.collapsed);
this.output_area.toggle_output();
};