From a61388dd5e3eaf8cb72ca0b16e507dedd7eeab07 Mon Sep 17 00:00:00 2001 From: Derrick Liu Date: Fri, 23 Sep 2016 10:30:05 -0700 Subject: [PATCH] Feature group docstrings, make layers param optional in feature group constructor --- leaflet/leaflet.d.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/leaflet/leaflet.d.ts b/leaflet/leaflet.d.ts index e5fc545e43..8102230ab9 100644 --- a/leaflet/leaflet.d.ts +++ b/leaflet/leaflet.d.ts @@ -535,14 +535,37 @@ declare namespace L { export function layerGroup(layers: Array): LayerGroup; + /** + * Extended LayerGroup that also has mouse events (propagated from + * members of the group) and a shared bindPopup method. + */ export interface FeatureGroup extends LayerGroup { + /** + * Sets the given path options to each layer of the group that has a setStyle method. + */ setStyle(style: PathOptions): this; + + /** + * Brings the layer group to the top of all other layers + */ bringToFront(): this; + + /** + * Brings the layer group to the top [sic] of all other layers + */ bringToBack(): this; + + /** + * Returns the LatLngBounds of the Feature Group (created from + * bounds and coordinates of its children). + */ getBounds(): LatLngBounds; } - export function featureGroup(layers: Array): FeatureGroup; + /** + * Create a feature group, optionally given an initial set of layers. + */ + export function featureGroup(layers?: Array): FeatureGroup; type StyleFunction = (feature: any) => PathOptions;