From 944d197690a83c312e18184b1e334e1b8ce1faa8 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 21 Nov 2012 16:06:20 +0100 Subject: [PATCH] Return created HTML element in Control.Layers._addItem Goal is to make easier and DRYer to customize layer HTML item when extending Control.Layers class --- src/control/Control.Layers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/control/Control.Layers.js b/src/control/Control.Layers.js index 774fd577..186ea025 100644 --- a/src/control/Control.Layers.js +++ b/src/control/Control.Layers.js @@ -174,6 +174,8 @@ L.Control.Layers = L.Control.extend({ var container = obj.overlay ? this._overlaysList : this._baseLayersList; container.appendChild(label); + + return label; }, _onInputClick: function () {