From a67d23bc47c22604edb3239c7aeb3d5f7b529946 Mon Sep 17 00:00:00 2001 From: Antonino Parisi Date: Fri, 19 Feb 2016 14:03:43 +0000 Subject: [PATCH 1/3] Add support for HTML content. Add support for HTML content just like the MarkerWithLabel extension for Google Maps. --- dist/leaflet.label-src.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/leaflet.label-src.js b/dist/leaflet.label-src.js index a8e930c..01c77d8 100644 --- a/dist/leaflet.label-src.js +++ b/dist/leaflet.label-src.js @@ -154,6 +154,12 @@ L.Label = (L.Layer ? L.Layer : L.Class).extend({ this._prevContent = this._content; + this._labelWidth = this._container.offsetWidth; + } else if (this._content instanceof Element) { + this._container.appendChild(this._content); + + this._prevContent = this._content; + this._labelWidth = this._container.offsetWidth; } }, @@ -542,4 +548,4 @@ L.FeatureGroup.include({ } }); -}(window, document)); \ No newline at end of file +}(window, document)); From 60bafa5f07ae1820ac31ee6f462384eaf985c0dc Mon Sep 17 00:00:00 2001 From: Antonino Parisi Date: Fri, 19 Feb 2016 14:04:24 +0000 Subject: [PATCH 2/3] Add support for HTML content. Add support for HTML content just like the MarkerWithLabel extension for Google Maps. --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 389076f..c1dcde0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "Leaflet.label", - "version": "0.2.2", + "version": "0.2.3", "homepage": "https://github.com/Leaflet/Leaflet.label", "authors": [ "Jacob Toye " From be409b227f4fe9f28fdfeead352344feaac5c08c Mon Sep 17 00:00:00 2001 From: Antonino Parisi Date: Fri, 19 Feb 2016 14:04:43 +0000 Subject: [PATCH 3/3] Add support for HTML content. Add support for HTML content just like the MarkerWithLabel extension for Google Maps. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a74c9e0..21a871a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "leaflet.label", - "version": "0.2.1", + "version": "0.2.3", "description": "Labels for leaflet maps", "devDependencies": { "jshint": "~2.1.4",