maplibre-gl-layer-control 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.ts +14 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -280,6 +280,8 @@ export declare class LayerControl implements IControl {
|
|
|
280
280
|
private onLayerRename?;
|
|
281
281
|
private onLayerReorder?;
|
|
282
282
|
private onLayerRemove?;
|
|
283
|
+
private onBackgroundVisibilityChange?;
|
|
284
|
+
private onBackgroundOpacityChange?;
|
|
283
285
|
private enableBackgroundPresets;
|
|
284
286
|
private backgroundPresetStorageKey;
|
|
285
287
|
private onBackgroundPresetsChange?;
|
|
@@ -818,6 +820,18 @@ export declare interface LayerControlOptions {
|
|
|
818
820
|
onLayerReorder?: (layerOrder: string[]) => void;
|
|
819
821
|
/** Callback when a layer is removed via context menu */
|
|
820
822
|
onLayerRemove?: (layerId: string) => void;
|
|
823
|
+
/**
|
|
824
|
+
* Callback fired when the Background (basemap) group visibility is toggled
|
|
825
|
+
* via the control's checkbox. Lets consumers mirror the new state into their
|
|
826
|
+
* own store so external basemap UI (e.g. a separate layer panel) stays in sync.
|
|
827
|
+
*/
|
|
828
|
+
onBackgroundVisibilityChange?: (visible: boolean) => void;
|
|
829
|
+
/**
|
|
830
|
+
* Callback fired when the Background (basemap) group opacity is changed via
|
|
831
|
+
* the control's slider. Lets consumers mirror the new opacity into their own
|
|
832
|
+
* store so external basemap UI stays in sync.
|
|
833
|
+
*/
|
|
834
|
+
onBackgroundOpacityChange?: (opacity: number) => void;
|
|
821
835
|
/**
|
|
822
836
|
* Whether to show the "Saved configurations" controls in the Background Layers
|
|
823
837
|
* panel, letting users save the current basemap element visibility as a named
|