--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/c6660855-aa20-44d7-995b-0dba4d4e5980n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/CAOk7GcR4QbQtqOhqzN%3Du-Km7Mp%3DVWSHg7HXSNarMbO99JYkGTA%40mail.gmail.com.
Hello Mark and Beka,Thanks for your response!I create multiple notches using the below code in ConstantProvider class.Is there any way we can access current block details in ConstantProvider class? because i want to access the block type/name and decide the notch count.makeRectangularConn(in_out_length?: any) {in_out_length = 2;const width = this.NOTCH_WIDTH;const height = this.NOTCH_HEIGHT;function makeMainPath(dir) {let path = Blockly.utils.svgPaths.line([Blockly.utils.svgPaths.point(0, height),Blockly.utils.svgPaths.point(dir * width, 0),Blockly.utils.svgPaths.point(0, -height),]);if(in_out_length === 1){console.log(path);return path;}else{for(let i = 1; i < in_out_length; i++){path = path+createNotch(dir);}console.log(path);return path;}}function createNotch(dir){return Blockly.utils.svgPaths.line([Blockly.utils.svgPaths.point(dir * (width-10), 0),Blockly.utils.svgPaths.point(0, height),Blockly.utils.svgPaths.point(dir * width, 0),Blockly.utils.svgPaths.point(0, -height),]);}
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/dbef4d96-385f-4444-96e3-4e0d2fa622cen%40googlegroups.com.