kopia lustrzana https://github.com/backface/turtlestitch
propagate HIDE and SHOW to nested sprite parts
rodzic
bfdbeca146
commit
b2399309e4
|
@ -2250,3 +2250,7 @@ ______
|
||||||
* updated German translation
|
* updated German translation
|
||||||
* Morphic: fixed #497 (prevent bubble shadows from getting cut-off)
|
* Morphic: fixed #497 (prevent bubble shadows from getting cut-off)
|
||||||
* Blocks: keep result-bubbles within the enclosing scripting pane
|
* Blocks: keep result-bubbles within the enclosing scripting pane
|
||||||
|
|
||||||
|
140730
|
||||||
|
------
|
||||||
|
* Objects: propagate HIDE and SHOW to nested sprite parts
|
||||||
|
|
19
objects.js
19
objects.js
|
@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.objects = '2014-July-29';
|
modules.objects = '2014-July-30';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -2708,6 +2708,23 @@ SpriteMorph.prototype.removeClone = function () {
|
||||||
|
|
||||||
// SpriteMorph primitives
|
// 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 pen color
|
||||||
|
|
||||||
SpriteMorph.prototype.setColor = function (aColor) {
|
SpriteMorph.prototype.setColor = function (aColor) {
|
||||||
|
|
Ładowanie…
Reference in New Issue