mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Let comment change event handler multitask.
This commit is contained in:
parent
7b55d8e7ab
commit
6bc04c4bef
1 changed files with 5 additions and 9 deletions
|
@ -375,18 +375,14 @@ class Blocks {
|
||||||
const change = e.newContents_;
|
const change = e.newContents_;
|
||||||
if (change.hasOwnProperty('minimized')) {
|
if (change.hasOwnProperty('minimized')) {
|
||||||
comment.minimized = change.minimized;
|
comment.minimized = change.minimized;
|
||||||
break;
|
}
|
||||||
} else if (change.hasOwnProperty('width') && change.hasOwnProperty('height')){
|
if (change.hasOwnProperty('width') && change.hasOwnProperty('height')){
|
||||||
comment.width = change.width;
|
comment.width = change.width;
|
||||||
comment.height = change.height;
|
comment.height = change.height;
|
||||||
break;
|
|
||||||
} else if (change.hasOwnProperty('text')) {
|
|
||||||
comment.text = change.text;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
log.warn(`Unrecognized comment change: ${
|
if (change.hasOwnProperty('text')) {
|
||||||
JSON.stringify(change)} for comment with id: ${e.commentId}.`);
|
comment.text = change.text;
|
||||||
return;
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'comment_move':
|
case 'comment_move':
|
||||||
|
|
Loading…
Reference in a new issue