Skip to content

Commit 6bbbdf7

Browse files
authored
fix: use Scratch-style text blocks (#37)
1 parent c548298 commit 6bbbdf7

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

blocks_common/text.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,8 @@
2222
* @fileoverview Text blocks for Blockly.
2323
* @author [email protected] (Neil Fraser)
2424
*/
25-
'use strict';
26-
27-
goog.provide('Blockly.Blocks.texts');
28-
29-
goog.require('Blockly.Blocks');
30-
31-
goog.require('Blockly.Colours');
32-
33-
goog.require('Blockly.constants');
25+
import * as Blockly from 'blockly';
26+
import {Colours} from '../core/colours.js';
3427

3528
Blockly.Blocks['text'] = {
3629
/**
@@ -47,11 +40,10 @@ Blockly.Blocks['text'] = {
4740
}
4841
],
4942
"output": "String",
50-
"outputShape": Blockly.OUTPUT_SHAPE_ROUND,
51-
"colour": Blockly.Colours.textField,
52-
"colourSecondary": Blockly.Colours.textField,
53-
"colourTertiary": Blockly.Colours.textField,
54-
"colourQuaternary": Blockly.Colours.textField
43+
"colour": Colours.textField,
44+
"colourSecondary": Colours.textField,
45+
"colourTertiary": Colours.textField,
46+
"colourQuaternary": Colours.textField
5547
});
5648
}
5749
};

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import * as Blockly from 'blockly/core';
88
import '../blocks_common/math.js';
9+
import '../blocks_common/text.js';
910
import '../blocks_vertical/vertical_extensions.js';
1011
import '../blocks_vertical/control.js';
1112
import '../blocks_vertical/data.js';

0 commit comments

Comments
 (0)