Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Add support for HTML content. #145

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
Expand Down
8 changes: 7 additions & 1 deletion dist/leaflet.label-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
},
Expand Down Expand Up @@ -542,4 +548,4 @@ L.FeatureGroup.include({
}
});

}(window, document));
}(window, document));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down