Skip to content

Commit

Permalink
Merge pull request #181 from Grsmto/buttons-size-i18n
Browse files Browse the repository at this point in the history
Buttons horizontal size was hardcoded in JS (fix #180)
  • Loading branch information
jacobtoye committed Sep 5, 2013
2 parents e3e8076 + 7713edd commit 39fce3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions dist/leaflet.draw.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}

.leaflet-draw-actions li {
float: left;
display: inline-block;
}

.leaflet-draw-actions li:first-child a {
Expand Down Expand Up @@ -87,7 +87,8 @@
font: 11px/19px "Helvetica Neue", Arial, Helvetica, sans-serif;
line-height: 28px;
text-decoration: none;
width: 50px;
padding-left: 10px;
padding-right: 10px;
height: 28px;
}

Expand All @@ -97,6 +98,7 @@

.leaflet-draw-actions-top {
margin-top: 1px;
white-space: nowrap;
}

.leaflet-draw-actions-top a,
Expand Down
3 changes: 0 additions & 3 deletions src/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ L.Toolbar = L.Class.extend({
var container = L.DomUtil.create('ul', 'leaflet-draw-actions'),
buttonWidth = 50,

This comment has been minimized.

Copy link
@winsento

winsento Sep 5, 2013

Remove the variable buttonWidth, it is never used.

l = buttons.length,
containerWidth = (l * buttonWidth) + (l - 1), //l - 1 = the borders
li, button;

for (var i = 0; i < l; i++) {
Expand All @@ -148,8 +147,6 @@ L.Toolbar = L.Class.extend({
});
}

container.style.width = containerWidth + 'px';

return container;
},

Expand Down

0 comments on commit 39fce3c

Please sign in to comment.