Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion main/main.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -1020,7 +1020,18 @@ function initializeApp() {
runCodeButton.removeAttribute("disabled");
if (exampleSelect) exampleSelect.removeAttribute("disabled");

if (fullscreenToggle) fullscreenToggle.removeAttribute("disabled");
if (fullscreenToggle) {
const fullscreenSupported =
document.documentElement.requestFullscreen ||
document.documentElement.mozRequestFullScreen ||
document.documentElement.webkitRequestFullscreen ||
document.documentElement.msRequestFullscreen;
if (fullscreenSupported) {
fullscreenToggle.removeAttribute("disabled");
} else {
fullscreenToggle.style.display = "none";
}
}

// Add event listeners for buttons and controls
/*toolboxControl.addEventListener("mouseover", function () {
Expand Down
14 changes: 13 additions & 1 deletion main/view.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -296,6 +296,7 @@ const canvasToggleBtn = document.getElementById("canvasToggleBtn");
const codeToggleBtn = document.getElementById("codeToggleBtn");

let savedView = "canvas";
let savedShortcutsVisible = false;

function addButtonListener() {
if (canvasToggleBtn) canvasToggleBtn.addEventListener("click", showCanvasView);
Expand DownExpand Up@@ -337,6 +338,8 @@ function showCodeView() {
}

export function showCanvasView() {
window.flockWorkspaceSearch?.close();

const gizmoButtons = document.getElementById("gizmoButtons");
const flockLink = document.getElementById("flocklink");
if (!gizmoButtons || !flockLink) return;
Expand DownExpand Up@@ -500,6 +503,7 @@ export function togglePlayMode() {
const gizmoButtons = document.getElementById("gizmoButtons");
const bottomBar = document.getElementById("bottomBar");
const flockLink = document.getElementById("flocklink");
const infoPanel = document.getElementById("info-panel");
const resizer = document.getElementById("resizer");
if (!blocklyArea || !canvasArea || !gizmoButtons || !bottomBar || !flockLink) {
return;
Expand All@@ -520,20 +524,28 @@ export function togglePlayMode() {

showCanvasView();
if (flock.scene) flock.scene.debugLayer.hide();
savedShortcutsVisible = !(window.flockShortcutsPanel?.panel?.classList.contains("hidden") ?? true);
window.flockShortcutsPanel?.hide();
Comment thread
coderabbitai[bot] marked this conversation as resolved.
blocklyArea.style.display = "none";
gizmoButtons.style.display = "none";
bottomBar.style.display = "none";
flockLink.style.display = "none";
if (infoPanel) infoPanel.style.display = "none";
if (resizer) resizer.style.display = "none";
document.documentElement.style.setProperty("--dynamic-offset", "40px");
} else {
if (flock.scene) flock.scene.debugLayer.hide();
blocklyArea.style.display = "block";
canvasArea.style.display = "";
gizmoButtons.style.display = "block";
bottomBar.style.display = "block";
bottomBar.style.display = "";
flockLink.style.display = "block";
if (infoPanel) infoPanel.style.display = "";
if (resizer) resizer.style.display = "block";
if (savedShortcutsVisible) {
window.flockShortcutsPanel?.show();
savedShortcutsVisible = false;
}
document.documentElement.style.setProperty("--dynamic-offset", "65px");

// On narrow screens, restore the saved view
Expand Down
8 changes: 1 addition & 7 deletions style.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -494,12 +494,6 @@ button {
position: relative;
}

@media (min-width: 769px) {
#workspaceSearchBtn,
#workspaceSearchBtn + .toolbar-divider {
display: none;
}
}

#blocklyZoomControls {
position: absolute;
Expand DownExpand Up@@ -919,7 +913,7 @@ button {
}

#blocklyDiv {
height: calc(100% - 59px - max(0px, env(safe-area-inset-bottom, 0px))) !important;
height: calc(100% - 85px - max(0px, env(safe-area-inset-bottom, 0px))) !important;
}
}

Expand Down
5 changes: 5 additions & 0 deletions style/blockly.css
Original file line numberDiff line numberDiff line change
Expand Up@@ -284,6 +284,11 @@ body[data-theme='low-vision'] {
paint-order: stroke fill;
}

/* Suppress the Zelos selection glow path when the search outline is already showing */
#blocklyDiv.blockly-search-active .ws-search-current > path.blocklyPathSelected {
display: none;
}

@media (min-width: 769px) {
.blocklyTreeRow {
flex-direction: row;
Expand Down
Loading