forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DefinitelyTyped#7496 from wcomartin/master
Add leaflet.fullscreen library definitions
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/// <reference path="leaflet.fullscreen.d.ts" /> | ||
|
||
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: '<i class="fa fa-arrows-alt"></i>', | ||
forceSeparateButton: true, | ||
}).addTo(map); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Type definitions for Leaflet.fullscreen v1.3.0 | ||
// Project: https://github.com/brunob/leaflet.fullscreen | ||
// Definitions by: William Comartin <https://github.com/wcomartin> | ||
// Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
|
||
/// <reference path="../leaflet/leaflet.d.ts" /> | ||
|
||
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; | ||
|
||
} | ||
} |