Blockly Editor custom Notch

Can anyone tell me how to change the shape of the blocky blockes.

i want to use custom renderers into my local copy of app inventor so can any tell me where i can injunct custom renderers in app inventor.

i have followed this tutorial
https://blocklycodelabs.dev/codelabs/custom-renderer/index.html?index=..%2F..index#0

thanks

@ewpatton sir can you please help me

Ewan is in vacation... you will have to be patient a few days...
Taifun

Hi @preetvadaliya,

App Inventor isn't on the latest version of Blockly, so custom renderers aren't currently supported :confused:

Sorry I can't be more help!
--Beka

2 Likes

@BeksOmega
Appybuilder's blocks are in custom shape that's why I asking

AppyBuilder used "start hats" which you can enable by setting Blockly.BlockSvg.START_HAT to true in block_svg.js.

3 Likes

Thanks Conor i got it but i am not looking for Blockly.BlockSvg.START_HAT i want to change in notch.

Technically you can create custom block shapes by editing the block_render_svg.js file. It's just really hard :confused: A lot of the constants are used in multiple places, which makes it hard to change one part of the block (eg the notch) without breaking other parts.

The other problem is that that file only lives in MIT's fork of the Blockly repo, not that normal app-inventor repo. So you'll also have to fork mit-cml/blockly to be able to make changes to block shapes.

However, if you did really really want to change it, the relevant code is here. Those strings are svg path line and curve commands. If you change the width of the notch you'll also want to update the notch width constant.

I hope that helps! If you have any further questions please reply!
--Beka

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.