From 384a4f4a5dbe893e4c6edcac900bc37c6d6d7779 Mon Sep 17 00:00:00 2001 From: Schwobaland Date: Thu, 6 Oct 2016 16:32:53 +0200 Subject: [PATCH] fixed setMaxBounds to match maxBounds in MapOptions (#11738) * fixed setMaxBounds to match maxBounds in MapOptions * comment removed and splitted into two overloads. --- leaflet/leaflet-tests.ts | 4 ++-- leaflet/leaflet.d.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/leaflet/leaflet-tests.ts b/leaflet/leaflet-tests.ts index 9b07b8fd03..4b435fe2af 100644 --- a/leaflet/leaflet-tests.ts +++ b/leaflet/leaflet-tests.ts @@ -237,8 +237,8 @@ map = map .panTo(latLngTuple, panOptions) .panBy(point) .panBy(pointTuple) - .setMaxBounds(bounds) // investigate if this really receives Bounds instead of LatLngBounds - .setMaxBounds(boundsLiteral) + .setMaxBounds(latLngBounds) + .setMaxBounds(latLngBoundsLiteral) .setMinZoom(5) .setMaxZoom(10) .panInsideBounds(latLngBounds) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index 50051df19d..2f5b908661 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -1231,8 +1231,8 @@ declare namespace L { panTo(latlng: LatLngTuple, options?: PanOptions): this; panBy(offset: Point): this; panBy(offset: PointTuple): this; - setMaxBounds(bounds: Bounds): this; // is this really bounds and not lanlngbounds? - setMaxBounds(bounds: BoundsLiteral): this; + setMaxBounds(bounds: LatLngBounds): this; + setMaxBounds(bounds: LatLngBoundsLiteral): this; setMinZoom(zoom: number): this; setMaxZoom(zoom: number): this; panInsideBounds(bounds: LatLngBounds, options?: PanOptions): this;