summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-07-30 18:25:11 +0200
committerGubolin <gubolin@fantasymail.de>2014-07-30 18:25:11 +0200
commit85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8 (patch)
tree9d3b02e63f40db23378fb3d49d45189a05ac73df /objects.js
parentb9ec43451b9feb0c743196e2b4c3419e5ff611f8 (diff)
parent0333925e916acc47c25cdcfec0c3be3d695a825f (diff)
downloadsnap-85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8.tar.gz
snap-85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8.zip
Merge branch 'master' of https://github.com/jmoenig/Snap--Build-Your-Own-Blocks
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) {