mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Switched to a nicer way of computing scaled width
Thanks, Shane.
This commit is contained in:
parent
3a6bce1efc
commit
542311b1da
2 changed files with 1 additions and 11 deletions
|
@ -308,16 +308,6 @@ public class Block extends Sprite {
|
|||
if (filters && (filters.length > 0)) filters = [];
|
||||
}
|
||||
|
||||
public function getScaledWidth():Number {
|
||||
var x:DisplayObject = this;
|
||||
var w:Number = width;
|
||||
do {
|
||||
w *= x.scaleX;
|
||||
x = x.parent;
|
||||
} while (x != stage);
|
||||
return w;
|
||||
}
|
||||
|
||||
private function runFeedbackFilters():Array {
|
||||
// filters for showing that a stack is running
|
||||
var f:GlowFilter = new GlowFilter(0xfeffa0);
|
||||
|
|
|
@ -120,7 +120,7 @@ public class Interpreter {
|
|||
var oldThread:Thread = activeThread;
|
||||
activeThread = new Thread(b, targetObj);
|
||||
var p:Point = b.localToGlobal(new Point(0, 0));
|
||||
app.showBubble(String(evalCmd(b)), p.x, p.y, b.getScaledWidth());
|
||||
app.showBubble(String(evalCmd(b)), p.x, p.y, b.getRect(app.stage).width);
|
||||
activeThread = oldThread;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue