Added isSerializable function and SERIALIZABLE property to fields.

This commit is contained in:
Beka Westberg
2019-04-16 13:25:25 -07:00
parent 9152b9dc94
commit e8573bc0db
18 changed files with 568 additions and 117 deletions

View File

@@ -58,6 +58,14 @@ Blockly.FieldCheckbox.fromJson = function(options) {
return new Blockly.FieldCheckbox(options['checked'] ? 'TRUE' : 'FALSE');
};
/**
* Serializable fields are saved by the XML renderer, non-serializable fields
* are not. Editable fields should also be serializable.
* @type {boolean}
* @const
*/
Blockly.FieldCheckbox.prototype.SERIALIZABLE = true;
/**
* Character for the checkmark.
*/