summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-06-06 09:07:42 +0200
committerjmoenig <jens@moenig.org>2014-06-06 09:07:42 +0200
commit4e2ce9a4ee2ffb5e22423290fd3ae34045e339fb (patch)
tree9774071176f992f560a068abc2c5d8634847eb69 /objects.js
parentfdfd74f79e5bfc6388397bdcc258e4672964f675 (diff)
downloadsnap-byow-4e2ce9a4ee2ffb5e22423290fd3ae34045e339fb.tar.gz
snap-byow-4e2ce9a4ee2ffb5e22423290fd3ae34045e339fb.zip
gracefully hide & show the stage, fixed #281
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index 897f14d..88ee351 100644
--- a/objects.js
+++ b/objects.js
@@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2014-Jun-05';
+modules.objects = '2014-Jun-06';
var SpriteMorph;
var StageMorph;
@@ -5191,6 +5191,23 @@ StageMorph.prototype.thumbnail = function (extentPoint, excludedSprite) {
return trg;
};
+// StageMorph hiding and showing:
+
+/*
+ override the inherited behavior to recursively hide/show all
+ children.
+*/
+
+StageMorph.prototype.hide = function () {
+ this.isVisible = false;
+ this.changed();
+};
+
+StageMorph.prototype.show = function () {
+ this.isVisible = true;
+ this.changed();
+};
+
// StageMorph cloning overrice
StageMorph.prototype.createClone = nop;