summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
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 c4c4eb8..fbb9e84 100644
--- a/objects.js
+++ b/objects.js
@@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2014-July-29';
+modules.objects = '2014-July-30';
var SpriteMorph;
var StageMorph;
@@ -2708,6 +2708,23 @@ SpriteMorph.prototype.removeClone = function () {
// SpriteMorph primitives
+// SpriteMorph hiding and showing:
+
+/*
+ override the inherited behavior to also hide/show all
+ nested parts.
+*/
+
+SpriteMorph.prototype.hide = function () {
+ SpriteMorph.uber.hide.call(this);
+ this.parts.forEach(function (part) {part.hide(); });
+};
+
+SpriteMorph.prototype.show = function () {
+ SpriteMorph.uber.show.call(this);
+ this.parts.forEach(function (part) {part.show(); });
+};
+
// SpriteMorph pen color
SpriteMorph.prototype.setColor = function (aColor) {