Shadow blocks custom context menu #8615
Labels
issue: feature request
Describes a new feature and why it should be added
needs more info
Waiting for developer response
PR: feature
Adds a feature
Check for duplicates
Problem
I'm working on creating a function block using the new version of Blockly, where users can dynamically add or remove multiple arguments that themselves are shadow blocks. Most blocks shouldn't be able to connect to this inputs but there are a few exceptions. I've also implemented a custom dragging strategy that allows new argument blocks to be created by dragging this shadow argument blocks.
Now, I wanted to enhance the shadow blocks by adding a context menu that allows users to edit or remove the selected block. However this is not possible due to a rule in the gesture class that makes the target of every shadow block its parent. I experimented with making the argument blocks non-movable instead of using shadow blocks, but this approach didn’t work with the dragging strategy.
Request
I would like to be able to add a custom context menu to shadow blocks.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: