Skip to content

Commit

Permalink
fix: use Scratch-style text blocks (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko authored Apr 22, 2024
1 parent c548298 commit 6bbbdf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
20 changes: 6 additions & 14 deletions blocks_common/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = {
/**
Expand All @@ -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
});
}
};
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 6bbbdf7

Please sign in to comment.