In Google Blockly Callback function executing while rendering the custom block

269 views Asked by At

We have upgraded the Blockly from version 1 to 3.20191014.

In the old Blockly, a callback function is not executed while the block is loaded, but in the new Blockly, a callback function is executed while loading. Due to that, my code is not working the same way it worked earlier.

For example:

var dropdown = new Blockly.FieldDropdown(activity_attributes, function(option) {
    this.sourceBlock_.updateShapeByAttribute_(object, option);
});

In the above code, the updateShapeByAttribute_ call was not executed in old Blockly, but is executing in new Blockly while loading.

Any suggestions?

0

There are 0 answers