Skip to content

Commit 4c5bd55

Browse files
committed
chore: Upgrade Blockly dependency to v12.
1 parent fc17d3d commit 4c5bd55

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@types/p5": "^1.7.6",
4949
"@typescript-eslint/eslint-plugin": "^6.7.2",
5050
"@typescript-eslint/parser": "^6.7.2",
51-
"blockly": "^11.2.1",
51+
"blockly": "^12.0.0-beta.1",
5252
"eslint": "^8.49.0",
5353
"eslint-config-google": "^0.14.0",
5454
"eslint-config-prettier": "^9.0.0",
@@ -61,7 +61,7 @@
6161
"typescript": "^5.4.5"
6262
},
6363
"peerDependencies": {
64-
"blockly": "^11.1.0"
64+
"blockly": "^12.0.0-beta.1"
6565
},
6666
"publishConfig": {
6767
"access": "public",

src/navigation.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,15 @@ export class Navigation {
448448
const flyoutContents = flyout.getContents();
449449
const firstFlyoutItem = flyoutContents[0];
450450
if (!firstFlyoutItem) return;
451-
if (firstFlyoutItem.button) {
451+
if (firstFlyoutItem.getType() === 'button') {
452452
const astNode = Blockly.ASTNode.createButtonNode(
453-
firstFlyoutItem.button,
453+
firstFlyoutItem.getElement() as Blockly.FlyoutButton,
454454
);
455455
this.getFlyoutCursor(workspace)!.setCurNode(astNode!);
456-
} else if (firstFlyoutItem.block) {
457-
const astNode = Blockly.ASTNode.createStackNode(firstFlyoutItem.block);
456+
} else if (firstFlyoutItem.getType() === 'block') {
457+
const astNode = Blockly.ASTNode.createStackNode(
458+
firstFlyoutItem.getElement() as Blockly.BlockSvg,
459+
);
458460
this.getFlyoutCursor(workspace)!.setCurNode(astNode!);
459461
}
460462
}

0 commit comments

Comments
 (0)