You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that for the click callback since we don't know where the callback is defined when we load the JSON it'll need to be added somehow.
I'm not sure if this should require an extension to add the onclick function or use a registration method like registerButtonCallback() in the toolbox.
Adding the name attribute to the field_image should be a lot more straightforward and can be done separately in a small PR.
Problem statement
Missing APIs in the JSON definitions.
There is no possibility to define a FieldImage opt_onClick via JSON (cf https://github.com/google/blockly/blob/master/core/field_image.js#L73)
More, as the FieldImage has no name attribute, you can't call "this.getField(name)" in an extension to define it.
Expected Behavior
Possibility to define the opt_onclick via JSON like
Actual Behavior
You can only define it via javascript
Additional Information
I post this issue because of my initial message on the Blockly Google group (cf https://groups.google.com/forum/#!topic/blockly/rzcpN8iIrRU)
Thanks,
Best regards,
Jerome.
The text was updated successfully, but these errors were encountered: