Hi Team,
I was creating custom blocks and styling them. here im facing some challenges
1) I was able to set width for custom block like below:
class CustomRenderer extends Blockly.blockRendering.Renderer{
constructor(name){
super(name);
this.makeConstants_ = () => {
return new CustomConstantsProvider();
}
this.makeRenderInfo_ = (block: Blockly.BlockSvg) => {
return new RenderInformation(this, block);
}
}
}
class RenderInformation extends Blockly.blockRendering.RenderInfo {
constructor(renderer: Blockly.blockRendering.Renderer, block: Blockly.BlockSvg){
super(renderer, block);
this.width = 300;
}
}
-> the width for the block is applied initially but, when i enter some text in value input/input field inside the block, the width of the block is increasing again
1) Is there any way we can set fixed width for a block?
2) How can we add some styling(height, width, bg color) to the input field or value input inside a block?
Could you please help me if there is any way to achieve this?
Thank you :)