summaryrefslogtreecommitdiff
path: root/blocks.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-07-05 10:40:57 +0200
committerjmoenig <jens@moenig.org>2013-07-05 10:40:57 +0200
commit3314477dc2068772482af6c638971e6b49f46428 (patch)
treedfb25d14c4454b39e9663d038b4ded7577337497 /blocks.js
parentb59f7f3e274688a4c70df6e9a16f02d88005a381 (diff)
downloadsnap-byow-3314477dc2068772482af6c638971e6b49f46428.tar.gz
snap-byow-3314477dc2068772482af6c638971e6b49f46428.zip
Blocks: fixed CommentMorph hiding/showing bug
when switching to / from presentation mode the previously hidden text (in collapsed state) was again shown along with the resize handle
Diffstat (limited to 'blocks.js')
-rw-r--r--blocks.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/blocks.js b/blocks.js
index 4258610..35b073f 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2013-July-04';
+modules.blocks = '2013-July-05';
var SyntaxElementMorph;
var BlockMorph;
@@ -9933,6 +9933,24 @@ CommentMorph.prototype.userMenu = function () {
return menu;
};
+// CommentMorph hiding and showing:
+
+/*
+ override the inherited behavior to recursively hide/show all
+ children, so that my instances get restored correctly when
+ switching back out of app mode.
+*/
+
+CommentMorph.prototype.hide = function () {
+ this.isVisible = false;
+ this.changed();
+};
+
+CommentMorph.prototype.show = function () {
+ this.isVisible = true;
+ this.changed();
+};
+
// CommentMorph dragging & dropping
CommentMorph.prototype.prepareToBeGrabbed = function () {