feat: extend supply workbench demo and map navigation
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user