mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Stop hide timeouts from sticking around through green flag/stop.
This commit is contained in:
parent
44ca62fefc
commit
87a0224790
1 changed files with 5 additions and 2 deletions
|
@ -93,6 +93,7 @@ class Scratch3LooksBlocks {
|
|||
bubbleState.skinId = null;
|
||||
}
|
||||
target.removeListener(RenderedTarget.EVENT_TARGET_MOVED, this._onTargetMoved);
|
||||
clearTimeout(this._bubbleTimeout);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -254,7 +255,8 @@ class Scratch3LooksBlocks {
|
|||
sayforsecs (args, util) {
|
||||
this.say(args, util);
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
this._bubbleTimeout = setTimeout(() => {
|
||||
this._bubbleTimeout = null;
|
||||
// Clear say bubble and proceed.
|
||||
this._updateBubble(util.target, 'say', '');
|
||||
resolve();
|
||||
|
@ -269,7 +271,8 @@ class Scratch3LooksBlocks {
|
|||
thinkforsecs (args, util) {
|
||||
this.think(args, util);
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => {
|
||||
this._bubbleTimeout = setTimeout(() => {
|
||||
this._bubbleTimeout = null;
|
||||
// Clear say bubble and proceed.
|
||||
this._updateBubble(util.target, 'think', '');
|
||||
resolve();
|
||||
|
|
Loading…
Reference in a new issue