Skip to content

Commit

Permalink
patch blockly from extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jwklong committed Dec 1, 2024
1 parent ef7daf2 commit 723e63f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/extensions/jwArray/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ const jwArray = {
class Extension {
constructor() {
vm.jwArray = jwArray

//patch square shape
if (Blockly !== undefined) {
Blockly.BlockSvg.INPUT_SHAPE_SQUARE =
Blockly.BlockSvg.TOP_LEFT_CORNER_START +
Blockly.BlockSvg.TOP_LEFT_CORNER +
' h ' + (4 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) +
Blockly.BlockSvg.TOP_RIGHT_CORNER +
' v ' + (8 * Blockly.BlockSvg.GRID_UNIT - 2 * Blockly.BlockSvg.CORNER_RADIUS) +
Blockly.BlockSvg.BOTTOM_RIGHT_CORNER +
' h ' + (-4 * Blockly.BlockSvg.GRID_UNIT + 2 * Blockly.BlockSvg.CORNER_RADIUS) +
Blockly.BlockSvg.BOTTOM_LEFT_CORNER +
' z';
}
}

getInfo() {
Expand Down

0 comments on commit 723e63f

Please sign in to comment.