File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ public class MotionAndPenPrims {
311
311
// turn away from the nearest edge if it's close enough; otherwise do nothing
312
312
// Note: comparisons are in the stage coordinates, with origin (0, 0)
313
313
// use bounding rect of the sprite to account for costume rotation and scale
314
- var r: Rectangle = s. getRect (app . stagePane );
314
+ var r: Rectangle = s. bounds ( );
315
315
// measure distance to edges
316
316
var d1: Number = Math . max (0 , r. left );
317
317
var d2: Number = Math . max (0 , r. top );
@@ -338,7 +338,7 @@ public class MotionAndPenPrims {
338
338
}
339
339
340
340
private function ensureOnStageOnBounce (s :ScratchSprite ):void {
341
- var r: Rectangle = s. getRect (app . stagePane );
341
+ var r: Rectangle = s. bounds ( );
342
342
if (r. left < 0 ) moveSpriteTo(s, s. scratchX - r. left , s. scratchY);
343
343
if (r. top < 0 ) moveSpriteTo(s, s. scratchX, s. scratchY + r. top );
344
344
if (r. right > ScratchObj. STAGEW ) {
You can’t perform that action at this time.
0 commit comments