mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
fix: cereal backwards compatibility (#5421)
* fix: remove duplicate serialization hook implementations * feat: add backwards compatibility to field serialization * feat: add support for serializing old mutator hooks * fix: build * fix: refactor field changes into helpers * fix: typo * fix: removing xmlns * tests: add tests for serialization and deserialization of mutator hooks * fix: switch to early returns
This commit is contained in:
committed by
alschmiedt
parent
448c433abe
commit
96935c2502
@@ -254,26 +254,6 @@ Blockly.FieldAngle.prototype.initView = function() {
|
||||
this.textElement_.appendChild(this.symbol_);
|
||||
};
|
||||
|
||||
/**
|
||||
* Saves this field's value.
|
||||
* @return {number} The angle value held by this field.
|
||||
* @override
|
||||
* @package
|
||||
*/
|
||||
Blockly.FieldAngle.prototype.saveState = function() {
|
||||
return /** @type {number} */ (this.getValue());
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the field's value based on the given state.
|
||||
* @param {*} state The state to apply to the angle field.
|
||||
* @override
|
||||
* @package
|
||||
*/
|
||||
Blockly.FieldAngle.prototype.loadState = function(state) {
|
||||
this.setValue(state);
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the graph when the field rerenders.
|
||||
* @protected
|
||||
|
||||
Reference in New Issue
Block a user