-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
issue: feature requestDescribes a new feature and why it should be addedDescribes a new feature and why it should be addedissue: triageIssues awaiting triage by a Blockly team memberIssues awaiting triage by a Blockly team member
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Problem
See also #1446. When you add a button to a category-less toolbox, you cannot register a button callback because the toolbox is created immediately when calling inject() to create the workspace.
Request
To fix this, I'd suggest adding an option "buttonCallbacks", which is an object with the key being the callbackKey and the value being the callback function. This way, button callbacks are always available when the toolbox is created.
Example
...
buttonCallbacks: {
mycallback: function(button) { ... },
myothercallback: function(button) { ... }
}
Alternatives considered
Another useful option would be a callback or an event that is fired immediately after initializing the workspace so users have an option to add/modify the workspace.
Additional context
No response
Metadata
Metadata
Assignees
Labels
issue: feature requestDescribes a new feature and why it should be addedDescribes a new feature and why it should be addedissue: triageIssues awaiting triage by a Blockly team memberIssues awaiting triage by a Blockly team member