From ec50e94524cc2a5ca8f76fb5dd1cdd133bf454f5 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 12 Jun 2012 19:13:30 -0700 Subject: [PATCH] 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. --- IPython/frontend/html/notebook/static/js/codecell.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index 1e8b1551f..526862660 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -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(); };