Skip to content

Commit 4734f20

Browse files
committed
Refactoring updates
1 parent f5151f2 commit 4734f20

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

main/execution.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ export async function executeCode() {
3636

3737
// Switch to code view if currently in canvas view
3838
if (currentView === "canvas") {
39-
currentView = "code";
40-
container.style.transform = `translateX(0px)`; // Move to Code view
41-
switchViewsBtn.textContent = "Canvas >>"; // Update button text
39+
const { showCodeView } = await import("./view.js");
40+
showCodeView();
4241
}
4342

4443
disposeGizmoManager();

main/export.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import * as Blockly from "blockly";
2+
import {
3+
importSnippet,
4+
} from "./files.js";
25

36
async function exportBlockSnippet(block) {
47
try {

main/view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ document.addEventListener("DOMContentLoaded", () => {
176176

177177
let currentView = "start"; // Start with the code view
178178
// Function to be called once the app has fully loaded
179-
export {currentView,switchView, codeMode};
179+
export {currentView,switchView, codeMode, showCodeView};
180180

181181
const container = document.getElementById("maincontent");
182182
const bottomBar = document.getElementById("bottomBar");

0 commit comments

Comments
 (0)