mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -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;
|
bubbleState.skinId = null;
|
||||||
}
|
}
|
||||||
target.removeListener(RenderedTarget.EVENT_TARGET_MOVED, this._onTargetMoved);
|
target.removeListener(RenderedTarget.EVENT_TARGET_MOVED, this._onTargetMoved);
|
||||||
|
clearTimeout(this._bubbleTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -254,7 +255,8 @@ class Scratch3LooksBlocks {
|
||||||
sayforsecs (args, util) {
|
sayforsecs (args, util) {
|
||||||
this.say(args, util);
|
this.say(args, util);
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
setTimeout(() => {
|
this._bubbleTimeout = setTimeout(() => {
|
||||||
|
this._bubbleTimeout = null;
|
||||||
// Clear say bubble and proceed.
|
// Clear say bubble and proceed.
|
||||||
this._updateBubble(util.target, 'say', '');
|
this._updateBubble(util.target, 'say', '');
|
||||||
resolve();
|
resolve();
|
||||||
|
@ -269,7 +271,8 @@ class Scratch3LooksBlocks {
|
||||||
thinkforsecs (args, util) {
|
thinkforsecs (args, util) {
|
||||||
this.think(args, util);
|
this.think(args, util);
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
setTimeout(() => {
|
this._bubbleTimeout = setTimeout(() => {
|
||||||
|
this._bubbleTimeout = null;
|
||||||
// Clear say bubble and proceed.
|
// Clear say bubble and proceed.
|
||||||
this._updateBubble(util.target, 'think', '');
|
this._updateBubble(util.target, 'think', '');
|
||||||
resolve();
|
resolve();
|
||||||
|
|
Loading…
Reference in a new issue