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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

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

View File

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