mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-03 23:42:50 +00:00
[@types/mapbox-gl] Add FullscreenControl optional constructor parameter (#36757)
This commit is contained in:
parent
1403877e74
commit
e0b59d09e5
12
types/mapbox-gl/index.d.ts
vendored
12
types/mapbox-gl/index.d.ts
vendored
@ -605,10 +605,18 @@ declare namespace mapboxgl {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fullscreen
|
||||
* FullscreenControl
|
||||
*/
|
||||
export class FullscreenControl extends Control {
|
||||
constructor();
|
||||
constructor(options?: FullscreenControlOptions | null);
|
||||
}
|
||||
|
||||
export interface FullscreenControlOptions {
|
||||
/**
|
||||
* A compatible DOM element which should be made full screen.
|
||||
* By default, the map container element will be made full screen.
|
||||
*/
|
||||
container?: HTMLElement | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -421,6 +421,14 @@ bool = bounds.isEmpty()
|
||||
let attributionControl = new mapboxgl.AttributionControl({ compact: false, customAttribution: '© YourCo' });
|
||||
attributionControl.on('click', () => {});
|
||||
|
||||
/*
|
||||
* FullscreenControl
|
||||
*/
|
||||
new mapboxgl.FullscreenControl();
|
||||
new mapboxgl.FullscreenControl(null);
|
||||
new mapboxgl.FullscreenControl({});
|
||||
new mapboxgl.FullscreenControl({container: document.querySelector('body')});
|
||||
|
||||
declare var lnglat: mapboxgl.LngLat;
|
||||
declare var lnglatlike: mapboxgl.LngLatLike;
|
||||
declare var lnglatboundslike: mapboxgl.LngLatBoundsLike;
|
||||
@ -829,4 +837,4 @@ expectType<mapboxgl.Expression>([
|
||||
['concat', ['get', 'name'], '\n'], {},
|
||||
['concat', ['get', 'area'], 'foobar', { 'font-scale': 0.8 }]
|
||||
]);
|
||||
expectType<mapboxgl.Expression>(['coalesce', ['get', 'property'], ['get', 'property']]);
|
||||
expectType<mapboxgl.Expression>(['coalesce', ['get', 'property'], ['get', 'property']]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user