From 204928101946daa96d911a732af6359cd76ee0f2 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 14 Aug 2019 07:21:21 -0700 Subject: [PATCH] Fixed turtle field registration. --- demos/custom-fields/field_turtle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demos/custom-fields/field_turtle.js b/demos/custom-fields/field_turtle.js index dc7b8c8ea..f31989dff 100644 --- a/demos/custom-fields/field_turtle.js +++ b/demos/custom-fields/field_turtle.js @@ -29,6 +29,7 @@ goog.provide('CustomFields.FieldTurtle'); // You must require the abstract field class to inherit from. goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.Size'); @@ -533,7 +534,7 @@ CustomFields.FieldTurtle.prototype.fromXml = function(fieldElement) { // Blockly needs to know the JSON name of this field. Usually this is // registered at the bottom of the field class. -Blockly.utils.fields.register('field_turtle', CustomFields.FieldTurtle); +Blockly.fieldRegistry.register('field_turtle', CustomFields.FieldTurtle); // Called by initView to create all of the SVGs. This is just used to keep // the code more organized. @@ -742,4 +743,4 @@ CustomFields.FieldTurtle.prototype.createView_ = function() { 'stroke': '#000', 'stroke-opacity': .3 }, this.stripesPattern_); -} +};