fix: improve mobile workbench controls

This commit is contained in:
2026-07-21 12:35:36 +08:00
parent caf06a8a82
commit ebe6cdc7f1
11 changed files with 144 additions and 62 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ describe("fitNetworkBounds", () => {
expect(options).toMatchObject({
duration: 600,
maxZoom: 13,
padding: { top: 48, right: 48, bottom: 48, left: 48 }
padding: { top: 96, right: 48, bottom: 48, left: 48 }
});
expect(options).not.toHaveProperty("zoom");
});
+1 -1
View File
@@ -13,7 +13,7 @@ export type NetworkViewParams = {
const WEB_MERCATOR_RADIUS = 6378137;
const GLOBAL_VIEW_MAX_ZOOM = 13;
const GLOBAL_VIEW_PADDING: PaddingOptions = { top: 48, right: 48, bottom: 48, left: 48 };
const GLOBAL_VIEW_PADDING: PaddingOptions = { top: 96, right: 48, bottom: 48, left: 48 };
export function getWorkbenchPadding(leftPanelOpen: boolean, rightPanelOpen: boolean): PaddingOptions {
return getWorkbenchCameraPadding(1280, {
agentOpen: leftPanelOpen,