summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-06-27 08:18:51 +0200
committerjmoenig <jens@moenig.org>2013-06-27 08:18:51 +0200
commitb8c48040a26befd6a4670dbc89f5e91ef51210ea (patch)
tree8b212b4c2b70d26a76249c60a52ef8a16e6479f2
parent71c331d4a16a0a5e729e155c7f916a6db1e09a0a (diff)
downloadsnap-b8c48040a26befd6a4670dbc89f5e91ef51210ea.tar.gz
snap-b8c48040a26befd6a4670dbc89f5e91ef51210ea.zip
fixed speech bubble scaling when sprite is not onstage
(reported in the Scratch forums)
-rwxr-xr-xhistory.txt4
-rw-r--r--objects.js5
2 files changed, 7 insertions, 2 deletions
diff --git a/history.txt b/history.txt
index b09f713..d248eb4 100755
--- a/history.txt
+++ b/history.txt
@@ -1765,3 +1765,7 @@ ______
130626
------
* GUI: fixed #100 saving costumes to the cloud
+
+130627
+------
+* Objects: fixed speech bubble scaling when sprite is not onstage (reported in the forums)
diff --git a/objects.js b/objects.js
index 9f7e5b9..98602e4 100644
--- a/objects.js
+++ b/objects.js
@@ -123,7 +123,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2013-June-24';
+modules.objects = '2013-June-27';
var SpriteMorph;
var StageMorph;
@@ -2507,6 +2507,7 @@ SpriteMorph.prototype.talkBubble = function () {
SpriteMorph.prototype.positionTalkBubble = function () {
var stage = this.parentThatIsA(StageMorph),
+ stageScale = stage ? stage.scale : 1,
bubble = this.talkBubble(),
middle = this.center().y;
if (!bubble) {return null; }
@@ -2519,7 +2520,7 @@ SpriteMorph.prototype.positionTalkBubble = function () {
bubble.setLeft(this.right());
bubble.setBottom(this.top());
while (!this.isTouching(bubble) && bubble.bottom() < middle) {
- bubble.silentMoveBy(new Point(-1, 1).scaleBy(stage.scale));
+ bubble.silentMoveBy(new Point(-1, 1).scaleBy(stageScale));
}
if (!stage) {return null; }
if (bubble.right() > stage.right()) {