From 6bbbdf763ba43d3dc0af7bad15478f848455f4df Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Mon, 22 Apr 2024 15:49:50 -0700 Subject: [PATCH] fix: use Scratch-style text blocks (#37) --- blocks_common/text.js | 20 ++++++-------------- src/index.js | 1 + 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/blocks_common/text.js b/blocks_common/text.js index 484475d642..aa66f2059b 100644 --- a/blocks_common/text.js +++ b/blocks_common/text.js @@ -22,15 +22,8 @@ * @fileoverview Text blocks for Blockly. * @author fraser@google.com (Neil Fraser) */ -'use strict'; - -goog.provide('Blockly.Blocks.texts'); - -goog.require('Blockly.Blocks'); - -goog.require('Blockly.Colours'); - -goog.require('Blockly.constants'); +import * as Blockly from 'blockly'; +import {Colours} from '../core/colours.js'; Blockly.Blocks['text'] = { /** @@ -47,11 +40,10 @@ Blockly.Blocks['text'] = { } ], "output": "String", - "outputShape": Blockly.OUTPUT_SHAPE_ROUND, - "colour": Blockly.Colours.textField, - "colourSecondary": Blockly.Colours.textField, - "colourTertiary": Blockly.Colours.textField, - "colourQuaternary": Blockly.Colours.textField + "colour": Colours.textField, + "colourSecondary": Colours.textField, + "colourTertiary": Colours.textField, + "colourQuaternary": Colours.textField }); } }; diff --git a/src/index.js b/src/index.js index 62f8b7ab2e..ac7110eebc 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,7 @@ import * as Blockly from 'blockly/core'; import '../blocks_common/math.js'; +import '../blocks_common/text.js'; import '../blocks_vertical/vertical_extensions.js'; import '../blocks_vertical/control.js'; import '../blocks_vertical/data.js';