diff options
| -rw-r--r-- | gui.js | 6 | ||||
| -rwxr-xr-x | history.txt | 1 | ||||
| -rw-r--r-- | objects.js | 8 |
3 files changed, 8 insertions, 7 deletions
@@ -4729,7 +4729,11 @@ SpriteIconMorph.prototype.createThumbnail = function () { this.thumbnail = new Morph(); this.thumbnail.setExtent(this.thumbSize); - this.thumbnail.image = this.object.fullThumbnail(this.thumbSize); + if (this.object instanceof SpriteMorph) { // support nested sprites + this.thumbnail.image = this.object.fullThumbnail(this.thumbSize); + } else { + this.thumbnail.image = this.object.thumbnail(this.thumbSize); + } this.add(this.thumbnail); }; diff --git a/history.txt b/history.txt index 250ba81..2a9e0eb 100755 --- a/history.txt +++ b/history.txt @@ -1855,3 +1855,4 @@ ______ 130807 ------ * Objects, GUI: Sprite Nesting preliminaries +* Objects: Fixed stage costume scaling & misplacing bug. Thanks, Josh, for the report! @@ -3551,8 +3551,8 @@ StageMorph.prototype.drawNew = function () { ctx.scale(this.scale, this.scale); ctx.drawImage( this.costume.contents, - (this.width() - this.costume.width() * this.scale) / 2, - (this.height() - this.costume.height() * this.scale) / 2 + (this.width() / this.scale - this.costume.width()) / 2, + (this.height() / this.scale - this.costume.height()) / 2 ); } }; @@ -4426,10 +4426,6 @@ StageMorph.prototype.thumbnail = function (extentPoint, excludedSprite) { return trg; }; -StageMorph.prototype.fullThumbnail = function (extentPoint, excludedSprite) { - return this.thumbnail(extentPoint, excludedSprite); -}; - // StageMorph cloning overrice StageMorph.prototype.createClone = nop; |
