Skip to content

Commit

Permalink
Merge pull request #18 from arfa/master
Browse files Browse the repository at this point in the history
Set the marker's Popup in the right position.
  • Loading branch information
dwilhelm89 committed Feb 26, 2016
2 parents df72810 + 2770dd6 commit eacd03b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/javascript/Leaflet.StyleForms.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ L.StyleForms = L.Class.extend({

var newIcon = new L.Icon({
iconUrl: this.options.markerApi + 'pin-' + markerStyle.size + '-' + markerStyle.icon + '+' + markerStyle.color + '.png',
iconSize: iconSize
iconSize: iconSize,
iconAnchor: [iconSize[0] / 2, iconSize[1] / 2],
popupAnchor: [0, -iconSize[1] / 2]
});
var currentElement = this.options.currentElement.target;
currentElement.setIcon(newIcon);
Expand Down

0 comments on commit eacd03b

Please sign in to comment.