feat: extend supply workbench demo and map navigation

This commit is contained in:
2026-09-23 13:19:30 +08:00
parent bebcf2a06c
commit 1752b9ef84
45 changed files with 2137 additions and 449 deletions
@@ -13,6 +13,8 @@ describe("workbench basemap surface tone", () => {
it.each([
["mapbox-light", "light"],
["mapbox-satellite", "satellite"],
["tianditu-vector", "light"],
["tianditu-image", "satellite"],
["none", "none"],
["unknown", "none"]
])("maps %s to %s", (baseLayerId, expectedTone) => {
@@ -37,11 +37,8 @@ export const WORKBENCH_LAYOUT = {
} as const;
export function resolveMobileWorkbenchOverlayLayout(timelineVisible: boolean) {
const { edgeInset, gap, dockHeight, timelineSummaryHeight } =
WORKBENCH_LAYOUT.mobileOverlay;
const dockBottom = timelineVisible
? edgeInset + timelineSummaryHeight + gap
: edgeInset;
const { edgeInset, gap, dockHeight, timelineSummaryHeight } = WORKBENCH_LAYOUT.mobileOverlay;
const dockBottom = timelineVisible ? edgeInset + timelineSummaryHeight + gap : edgeInset;
return {
timelineBottom: edgeInset,
@@ -118,11 +115,11 @@ export function getWorkbenchViewportLayout(viewportWidth: number): WorkbenchView
}
export function getWorkbenchBasemapTone(activeBaseLayerId: string): WorkbenchBasemapTone {
if (activeBaseLayerId === "mapbox-light") {
if (["mapbox-light", "tianditu-vector"].includes(activeBaseLayerId)) {
return "light";
}
if (activeBaseLayerId === "mapbox-satellite") {
if (["mapbox-satellite", "tianditu-image"].includes(activeBaseLayerId)) {
return "satellite";
}