Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Buttons horizontal size was hardcoded in JS (fix #180) #181

Merged
merged 1 commit into from

3 participants

@Grsmto

It uses 'display: inline-block' css property so it should not work on IE6/7 (as I didn't tested it I couldn't provide a conditional alternative, i'll do it later if pr is ok).
So, buttons can now contain any text length (for i18n) without breaking.

@jacobtoye
Owner

Awesome thanks :) I'll add a inline-block fix to the IE stylesheet.

@jacobtoye jacobtoye merged commit 39fce3c into from
@Grsmto Grsmto deleted the branch
@jacobtoye jacobtoye referenced this pull request from a commit
@jacobtoye jacobtoye Removing unused variable. refs #181 25bd228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 2, 2013
  1. @Grsmto
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 5 deletions.
  1. +4 −2 dist/leaflet.draw.css
  2. +0 −3  src/Toolbar.js
View
6 dist/leaflet.draw.css
@@ -58,7 +58,7 @@
}
.leaflet-draw-actions li {
- float: left;
+ display: inline-block;
}
.leaflet-draw-actions li:first-child a {
@@ -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;
}
@@ -97,6 +98,7 @@
.leaflet-draw-actions-top {
margin-top: 1px;
+ white-space: nowrap;
}
.leaflet-draw-actions-top a,
View
3  src/Toolbar.js
@@ -128,7 +128,6 @@ L.Toolbar = L.Class.extend({
var container = L.DomUtil.create('ul', 'leaflet-draw-actions'),
buttonWidth = 50,
l = buttons.length,
- containerWidth = (l * buttonWidth) + (l - 1), //l - 1 = the borders
li, button;
for (var i = 0; i < l; i++) {
@@ -148,8 +147,6 @@ L.Toolbar = L.Class.extend({
});
}
- container.style.width = containerWidth + 'px';
-
return container;
},
Something went wrong with that request. Please try again.