mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
@@ -79,6 +79,7 @@ Blockly.Block.obtain = function(workspace, prototypeName) {
|
||||
* type-specific functions for this block.
|
||||
*/
|
||||
Blockly.Block.prototype.initialize = function(workspace, prototypeName) {
|
||||
/** @type {string} */
|
||||
this.id = Blockly.Blocks.genUid();
|
||||
workspace.addTopBlock(this);
|
||||
this.fill(workspace, prototypeName);
|
||||
|
||||
@@ -113,6 +113,7 @@ Blockly.Field.prototype.init = function(block) {
|
||||
'x': -Blockly.BlockSvg.SEP_SPACE_X / 2,
|
||||
'y': 0,
|
||||
'height': 16}, this.fieldGroup_, this.sourceBlock_.workspace);
|
||||
/** @type {Element} */
|
||||
this.textElement_ = Blockly.createSvgElement('text',
|
||||
{'class': 'blocklyText', 'y': this.size_.height - 12.5}, this.fieldGroup_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user