Fixed latLngBounds argument type and added missing variables to DomUtil

This commit is contained in:
Alejandro Sánchez
2017-07-13 08:12:40 -06:00
parent 444664dd77
commit 4e3f4267c4
2 changed files with 15 additions and 1 deletions
+6 -1
View File
@@ -76,6 +76,10 @@ declare namespace L {
function enableImageDrag(): void;
function preventOutline(el: HTMLElement): void;
function restoreOutline(): void;
let TRANSFORM: string;
let TRANSITION: string;
let TRANSITION_END: string;
}
interface CRS {
@@ -170,7 +174,7 @@ declare namespace L {
function latLngBounds(southWest: LatLngExpression, northEast: LatLngExpression): LatLngBounds;
function latLngBounds(latlngs: LatLngBoundsLiteral): LatLngBounds;
function latLngBounds(latlngs: LatLngExpression[]): LatLngBounds;
type PointTuple = [number, number];
@@ -1541,6 +1545,7 @@ declare namespace L {
function indexOf(array: any[], el: any): number;
function requestAnimFrame(fn: () => void, context?: any, immediate?: boolean): number;
function cancelAnimFrame(id: number): void;
let lastId: number;
let emptyImageUrl: string;
}
+9
View File
@@ -20,6 +20,9 @@ let latLngBounds: L.LatLngBounds;
latLngBounds = L.latLngBounds(latLng, latLng);
latLngBounds = L.latLngBounds(latLngLiteral, latLngLiteral);
latLngBounds = L.latLngBounds(latLngTuple, latLngTuple);
latLngBounds = L.latLngBounds(latLngBoundsLiteral);
latLngBounds = L.latLngBounds([latLngLiteral, latLngLiteral, latLngLiteral]);
latLngBounds = L.latLngBounds([latLng, latLng, latLng]);
latLngBounds = new L.LatLngBounds(latLng, latLng);
latLngBounds = new L.LatLngBounds(latLngLiteral, latLngLiteral);
@@ -453,15 +456,21 @@ L.Util.bind(() => {}, {});
L.Util.stamp({});
L.Util.throttle(() => {}, 123, {});
L.Util.wrapNum(123, []);
L.Util.wrapNum(123, [], true);
L.Util.falseFn();
L.Util.formatNum(123);
L.Util.formatNum(123, 1);
L.Util.trim('word ');
L.Util.splitWords('word word');
L.Util.setOptions({}, {});
L.Util.getParamString({});
L.Util.getParamString({}, '');
L.Util.getParamString({}, '', true);
L.Util.template('template', {});
L.Util.isArray({});
L.Util.indexOf([], {});
L.Util.requestAnimFrame(() => {});
L.Util.requestAnimFrame(() => {}, {});
L.Util.requestAnimFrame(() => {}, {}, true);
L.Util.cancelAnimFrame(1);
L.Util.emptyImageUrl;