kopia lustrzana https://github.com/backface/turtlestitch
fixed speech bubble scaling when sprite is not onstage
(reported in the Scratch forums)pull/3/merge
rodzic
71c331d4a1
commit
b8c48040a2
|
@ -1765,3 +1765,7 @@ ______
|
||||||
130626
|
130626
|
||||||
------
|
------
|
||||||
* GUI: fixed #100 saving costumes to the cloud
|
* GUI: fixed #100 saving costumes to the cloud
|
||||||
|
|
||||||
|
130627
|
||||||
|
------
|
||||||
|
* Objects: fixed speech bubble scaling when sprite is not onstage (reported in the forums)
|
||||||
|
|
|
@ -123,7 +123,7 @@ PrototypeHatBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.objects = '2013-June-24';
|
modules.objects = '2013-June-27';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -2507,6 +2507,7 @@ SpriteMorph.prototype.talkBubble = function () {
|
||||||
|
|
||||||
SpriteMorph.prototype.positionTalkBubble = function () {
|
SpriteMorph.prototype.positionTalkBubble = function () {
|
||||||
var stage = this.parentThatIsA(StageMorph),
|
var stage = this.parentThatIsA(StageMorph),
|
||||||
|
stageScale = stage ? stage.scale : 1,
|
||||||
bubble = this.talkBubble(),
|
bubble = this.talkBubble(),
|
||||||
middle = this.center().y;
|
middle = this.center().y;
|
||||||
if (!bubble) {return null; }
|
if (!bubble) {return null; }
|
||||||
|
@ -2519,7 +2520,7 @@ SpriteMorph.prototype.positionTalkBubble = function () {
|
||||||
bubble.setLeft(this.right());
|
bubble.setLeft(this.right());
|
||||||
bubble.setBottom(this.top());
|
bubble.setBottom(this.top());
|
||||||
while (!this.isTouching(bubble) && bubble.bottom() < middle) {
|
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 (!stage) {return null; }
|
||||||
if (bubble.right() > stage.right()) {
|
if (bubble.right() > stage.right()) {
|
||||||
|
|
Ładowanie…
Reference in New Issue