Merge pull request #182 from trodi/master

adding type annotations
This commit is contained in:
Neil Fraser
2015-09-22 15:57:02 -07:00
2 changed files with 2 additions and 0 deletions

View File

@@ -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);

View File

@@ -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_);