Geomap: Fix default opacity for layers (#63426)

This commit is contained in:
Adela Almasan
2023-02-21 12:55:07 -06:00
committed by GitHub
parent 20591cc42b
commit 2240484935
2 changed files with 3 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ export const dayNightLayer: MapLayerRegistryItem<DayNightConfig> = {
}) })
}), }),
}); });
// Sun circle // Sun circle
const sunFeature = new Feature({ const sunFeature = new Feature({
geometry: new Point([]), geometry: new Point([]),

View File

@@ -4,6 +4,7 @@ import { FrameGeometrySourceMode } from '@grafana/schema';
import { GeomapPanel } from '../GeomapPanel'; import { GeomapPanel } from '../GeomapPanel';
import { geomapLayerRegistry } from '../layers/registry'; import { geomapLayerRegistry } from '../layers/registry';
import { defaultStyleConfig } from '../style/types';
import { GeomapLayerActions, MapLayerState } from '../types'; import { GeomapLayerActions, MapLayerState } from '../types';
import { initLayer } from './layers'; import { initLayer } from './layers';
@@ -51,6 +52,7 @@ export const getActions = (panel: GeomapPanel) => {
config: cloneDeep(item.defaultOptions), config: cloneDeep(item.defaultOptions),
location: item.showLocation ? { mode: FrameGeometrySourceMode.Auto } : undefined, location: item.showLocation ? { mode: FrameGeometrySourceMode.Auto } : undefined,
tooltip: true, tooltip: true,
...(!item.hideOpacity && { opacity: defaultStyleConfig.opacity }),
}, },
false false
).then((lyr) => { ).then((lyr) => {