mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-05 02:30:29 -04:00
Don't render say/think bubbles during tests
This change makes say & think commands work during headless tests.
This commit is contained in:
parent
2ae788ca28
commit
b61c6a8f76
1 changed files with 4 additions and 1 deletions
|
@ -153,13 +153,16 @@ class Scratch3LooksBlocks {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_renderBubble (target) {
|
_renderBubble (target) {
|
||||||
|
if (!this.runtime.renderer) return;
|
||||||
|
|
||||||
const bubbleState = this._getBubbleState(target);
|
const bubbleState = this._getBubbleState(target);
|
||||||
const {drawableVisible, type, text, onSpriteRight} = bubbleState;
|
const {drawableVisible, type, text, onSpriteRight} = bubbleState;
|
||||||
|
|
||||||
// Remove the bubble if target is not visible, or text is being set to blank
|
// Remove the bubble if target is not visible, or text is being set to blank
|
||||||
// without being initialized. See comment below about blank text optimization.
|
// without being initialized. See comment below about blank text optimization.
|
||||||
if (!target.visible || (text === '' && !bubbleState.skinId)) {
|
if (!target.visible || (text === '' && !bubbleState.skinId)) {
|
||||||
return this._onTargetWillExit(target);
|
this._onTargetWillExit(target);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bubbleState.skinId) {
|
if (bubbleState.skinId) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue