Skip to content

Commit 774e71d

Browse files
authored
Merge pull request #44 from codeofsumit/develop
version bumb and dist
2 parents 5c4f7af + 3e4c2c5 commit 774e71d

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

dist/leaflet.pm.css

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
width: 100%;
1919
}
2020

21+
.leaflet-buttons-control-button img.icon-polygon {
22+
content: url("assets/icons/polygon.png");
23+
}
24+
2125
.leaflet-buttons-control-button:hover {
2226
cursor: pointer;
2327
background-color: #f4f4f4;

dist/leaflet.pm.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ L.Control.PMButton = L.Control.extend({
111111

112112
setButton: function (options) {
113113
var button = {
114+
'className': options.className,
114115
'iconUrl': options.iconUrl,
115116
'onClick': options.onClick,
116117
'afterClick': options.afterClick,
@@ -155,7 +156,12 @@ L.Control.PMButton = L.Control.extend({
155156
L.DomUtil.addClass(newButton,'active');
156157

157158
var image = L.DomUtil.create('img', 'control-icon', newButton);
158-
image.setAttribute('src', button.iconUrl);
159+
if (button.iconUrl) {
160+
image.setAttribute('src', button.iconUrl);
161+
}
162+
if (button.className) {
163+
L.DomUtil.addClass(image, button.className);
164+
}
159165

160166
L.DomEvent
161167
.addListener(newButton, 'click', button.onClick, this)
@@ -265,7 +271,7 @@ L.PM.Draw.Poly = L.PM.Draw.extend({
265271
var self = this;
266272

267273
var drawPolyButton = {
268-
'iconUrl': 'assets/icons/polygon.png',
274+
'className': 'icon-polygon',
269275
'onClick': function() {
270276

271277
},

dist/leaflet.pm.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leaflet.pm",
3-
"version": "0.6.4",
3+
"version": "0.6.5",
44
"description": "A Leaflet Plugin For Editing Geometry Layers in Leaflet 1.0",
55
"main": "leaflet.pm.js",
66
"dependencies": {

0 commit comments

Comments
 (0)