mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
CommentChange events now store text changes in an object with property text, instead of just a string.
This commit is contained in:
parent
332e90e408
commit
d99a082952
1 changed files with 9 additions and 11 deletions
|
@ -374,17 +374,15 @@ class Blocks {
|
||||||
}
|
}
|
||||||
const comment = currTarget.comments[e.commentId];
|
const comment = currTarget.comments[e.commentId];
|
||||||
const change = e.newContents_;
|
const change = e.newContents_;
|
||||||
if (typeof change === 'object') {
|
if (change.hasOwnProperty('minimized')) {
|
||||||
if (change.hasOwnProperty('minimized')) {
|
comment.minimized = change.minimized;
|
||||||
comment.minimized = change.minimized;
|
break;
|
||||||
break;
|
} else if (change.hasOwnProperty('width') && change.hasOwnProperty('height')){
|
||||||
} else if (change.hasOwnProperty('width') && change.hasOwnProperty('height')){
|
comment.width = change.width;
|
||||||
comment.width = change.width;
|
comment.height = change.height;
|
||||||
comment.height = change.height;
|
break;
|
||||||
break;
|
} else if (change.hasOwnProperty('text')) {
|
||||||
}
|
comment.text = change.text;
|
||||||
} else if (typeof change === 'string') {
|
|
||||||
comment.text = change;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
log.warn(`Unrecognized comment change: ${
|
log.warn(`Unrecognized comment change: ${
|
||||||
|
|
Loading…
Reference in a new issue