Skip to content

Commit

Permalink
Merge pull request Leaflet#4090 from Leaflet/fix-4067
Browse files Browse the repository at this point in the history
Cast bgPos to L.Point
  • Loading branch information
IvanSanchez committed Dec 14, 2015
2 parents 1d6291b + 2919d8b commit c954367
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layer/marker/DivIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ L.DivIcon = L.Icon.extend({
div.innerHTML = options.html !== false ? options.html : '';

if (options.bgPos) {
div.style.backgroundPosition = (-options.bgPos.x) + 'px ' + (-options.bgPos.y) + 'px';
var bgPos = L.point(options.bgPos);
div.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';
}
this._setIconStyles(div, 'icon');

Expand Down

0 comments on commit c954367

Please sign in to comment.