I'm using Blockly to create a block-based programming interface, but I'm having an issue where the blocks sometimes lose their CSS and end up looking bad. I suspect that some other function in my code is damaging the style, but I can't seem to find the source of the problem.
Has anyone else experienced this issue with Blockly? Are there any known causes or solutions? Any tips on how to debug this issue would be greatly appreciated.
Thanks in advance for any help you can provide!
Blockly.get().mainWorkspace.clear();
Blockly.get().resetBlocksIds();
Blockly.get().Xml.domToWorkspace(
Blockly.get().Xml.textToDom(code),
Blockly.get().mainWorkspace
);
By the way, if I move each block manually, its correct style is restored.