diff --git a/leaflet.fullscreen/leaflet.fullscreen-tests.ts b/leaflet.fullscreen/leaflet.fullscreen-tests.ts new file mode 100644 index 000000000..d74a19dcb --- /dev/null +++ b/leaflet.fullscreen/leaflet.fullscreen-tests.ts @@ -0,0 +1,23 @@ +/// + +var map: L.Map; + +// Defaults +var icon: L.Control.Fullscreen = L.control.fullscreen({ + position: 'topleft', + title: 'Full Screen', + titleCancel: 'Exit Full Screen', + forceSeparateButton: false, + forcePseudoFullscreen: false +}); + +icon.addTo(map); + + +// My Usage + +L.control.fullscreen({ + position: 'topleft', + content: '', + forceSeparateButton: true, +}).addTo(map); diff --git a/leaflet.fullscreen/leaflet.fullscreen.d.ts b/leaflet.fullscreen/leaflet.fullscreen.d.ts new file mode 100644 index 000000000..864817f22 --- /dev/null +++ b/leaflet.fullscreen/leaflet.fullscreen.d.ts @@ -0,0 +1,32 @@ +// Type definitions for Leaflet.fullscreen v1.3.0 +// Project: https://github.com/brunob/leaflet.fullscreen +// Definitions by: William Comartin +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module L { + + namespace Control { + + export interface Fullscreen extends L.Control {} + + export interface FullscreenOptions { + content?: string, + position?: string, + title?: string, + titleCancel?: string, + forceSeparateButton?: boolean, + forcePseudoFullscreen?: boolean + } + } + + namespace control { + + /** + * Creates a fullscreen control. + */ + export function fullscreen(options?: Control.FullscreenOptions): L.Control.Fullscreen; + + } +}