Restore inline zone label editing on canvas (#134)

* fix: harden viewer/editor renderer init and error handling

* Bump @biomejs/biome and turbo versions

Update devDependencies: bump @biomejs/biome from ^2.4.4 to ^2.4.6 and turbo from ^2.8.12 to ^2.8.13. Regenerated bun.lock to reflect the updated resolved package versions.

* Restore inline zone label editing on canvas
This commit is contained in:
Aymeric Rabot
2026-03-05 16:45:32 -05:00
committed by GitHub
parent fb2c7c6c71
commit 036344d705
7 changed files with 215 additions and 26 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ export default function Editor({ projectId }: EditorProps) {
<AppSidebar />
</SidebarProvider>
<ErrorBoundary key={projectId} fallback={<EditorSceneCrashFallback />}>
<Viewer selectionManager="custom">
<Viewer selectionManager="custom" allowZoneLabelEditing>
<SelectionManager />
<FloatingActionMenu />
<ExportManager />
@@ -30,10 +30,14 @@ export const ZoneSystem = () => {
// Hide label if zone layer is off OR if in solo mode on a different level
const showLabel = visible && !hideInSoloMode
const targetOpacity = showLabel ? '1' : '0'
const targetPointerEvents = showLabel ? 'auto' : 'none'
const labelEl = document.getElementById(`${zoneId}-label`)
if (labelEl && labelEl.style.opacity !== targetOpacity) {
labelEl.style.opacity = targetOpacity
}
if (labelEl && labelEl.style.pointerEvents !== targetPointerEvents) {
labelEl.style.pointerEvents = targetPointerEvents
}
})
})