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
pull/3/merge
jmoenig 2013-07-05 10:40:57 +02:00
rodzic b59f7f3e27
commit 3314477dc2
2 zmienionych plików z 23 dodań i 1 usunięć

Wyświetl plik

@ -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 () {

Wyświetl plik

@ -1782,3 +1782,7 @@ ______
130704
------
* Codification (text code mapping and block header support)
130705
------
* Blocks: fixed CommentMorph hiding/showing bug when switching to / from presentation mode