Allow only 1 block to be nested within another block

24 views
Skip to first unread message

Ahana Ghosh

unread,
Nov 21, 2021, 7:56:19 PM11/21/21
to Blockly Games
Hi,

I am trying to freeze a blockly code in the Workspace and not allow any insertions/deletions to it except at one location, where only 1 block may be nested.

I have set the following parameters to the blocks in the  Workspace:
- block.setDeletable(false);
- block.setMovable(false);
- block.setEditable(false);

The code is not editable except that: the interface still allows blocks to be inserted in between the code, when taken from the Store in the Workspace. 

I was looking for solutions to stop this from being allowed as well to the code in the Workspace?

Thanks and Regards,
Ahana
Reply all
Reply to author
Forward
0 new messages