Skip to content

Commit

Permalink
✨ Return to blockly when loading default workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
mobyw committed Sep 30, 2024
1 parent 24df0de commit 3a85816
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app/src/components/TutorialTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { initWorkspaceState } from "@/workspace";
</v-card-text>
<v-card-text>
<v-btn color="tertiary" @click="initWorkspaceState">
点击此按钮加载示例
点击此按钮加载默认示例
</v-btn>
</v-card-text>
<v-card-text>
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export function initWorkspaceState() {
let startBlocks = workspaceStore.startBlocks;
let workspace = Blockly.getMainWorkspace();
Blockly.serialization.workspaces.load(startBlocks, workspace);
outputsStore.activeTab = "tab-0";
}

export function generateCode() {
Expand Down

0 comments on commit 3a85816

Please sign in to comment.