Try to pin the bubbles within the left/right bounds
This commit is contained in:
1 parent
b00a619e2d
commit
4599a71dd7
1 file changed
+5
-1
@@ -125,7 +125,11 @@ class Scratch3LooksBlocks {
|
||||
} else {
|
||||
this.runtime.renderer.updateDrawableProperties(bubbleState.drawableId, {
|
||||
position: [
|
||||
bubbleState.onSpriteRight ? targetBounds.right : targetBounds.left - bubbleWidth,
|
||||
bubbleState.onSpriteRight ? (
|
||||
Math.min(stageBounds.right - bubbleWidth, targetBounds.right)
|
||||
) : (
|
||||
Math.max(stageBounds.left, targetBounds.left - bubbleWidth)
|
||||
),
|
||||
Math.min(stageBounds.top, targetBounds.top + bubbleHeight)
|
||||
]
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user