blockly > BlockSvg > saveConnections

BlockSvg.saveConnections property

An optional method which saves a record of blocks connected to this block so they can be later restored after this block is recoomposed (reconfigured). Typically records the connected blocks on properties on blocks in the mutator flyout, so that rearranging those component blocks will automatically rearrange the corresponding connected blocks on this block after this block is recomposed.

To keep the saved connection information up-to-date, MutatorIcon arranges for an event listener to call this method any time the mutator flyout is open and a change occurs on this block's workspace.

Signature:

saveConnections?: (rootBlock: BlockSvg) => void;