diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-07-30 18:25:11 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-07-30 18:25:11 +0200 |
| commit | 85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8 (patch) | |
| tree | 9d3b02e63f40db23378fb3d49d45189a05ac73df /objects.js | |
| parent | b9ec43451b9feb0c743196e2b4c3419e5ff611f8 (diff) | |
| parent | 0333925e916acc47c25cdcfec0c3be3d695a825f (diff) | |
| download | snap-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.js | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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) { |
