From 7330129cc6332bdc324727db70a57229d79d3bb4 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Thu, 19 Mar 2020 12:40:01 -0400 Subject: [PATCH] Revert "add SAY_OR_THINK getter" This reverts commit ffd2a2a9e8f7a95df6bd81d60fe1457fcb4a1918. --- src/blocks/scratch3_looks.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js index 753c71932a..762cfa6ec5 100644 --- a/src/blocks/scratch3_looks.js +++ b/src/blocks/scratch3_looks.js @@ -34,7 +34,7 @@ class Scratch3LooksBlocks { this.runtime.on('targetWasRemoved', this._onTargetWillExit); // Enable other blocks to use bubbles like ask/answer - this.runtime.on(Scratch3LooksBlocks.SAY_OR_THINK, this._updateBubble); + this.runtime.on('SAY', this._updateBubble); } /** @@ -60,16 +60,6 @@ class Scratch3LooksBlocks { return 'Scratch.looks'; } - /** - * Event name for a text bubble being created or updated. - * @const {string} - */ - static get SAY_OR_THINK () { - // There are currently many places in the codebase which explicitly refer to this event by the string 'SAY', - // so keep this as the string 'SAY' for now rather than changing it to 'SAY_OR_THINK' and breaking things. - return 'SAY'; - } - /** * Limit for say bubble string. * @const {string} @@ -330,7 +320,7 @@ class Scratch3LooksBlocks { say (args, util) { // @TODO in 2.0 calling say/think resets the right/left bias of the bubble - this.runtime.emit(Scratch3LooksBlocks.SAY_OR_THINK, util.target, 'say', args.MESSAGE); + this.runtime.emit('SAY', util.target, 'say', args.MESSAGE); } sayforsecs (args, util) { @@ -350,7 +340,7 @@ class Scratch3LooksBlocks { } think (args, util) { - this.runtime.emit(Scratch3LooksBlocks.SAY_OR_THINK, util.target, 'think', args.MESSAGE); + this.runtime.emit('SAY', util.target, 'think', args.MESSAGE); } thinkforsecs (args, util) {