leaflet 0.7 release

hopefully improves things further, especially on kitkat
This commit is contained in:
Jon Atkins 2013-11-22 06:07:23 +00:00
parent e6c0c9a51a
commit 662cb4c662
3 changed files with 179 additions and 148 deletions

View File

@ -7,7 +7,7 @@
var oldL = window.L, var oldL = window.L,
L = {}; L = {};
L.version = '0.7-dev'; L.version = '0.7';
// define Leaflet for Node module pattern loaders, including Browserify // define Leaflet for Node module pattern loaders, including Browserify
if (typeof module === 'object' && typeof module.exports === 'object') { if (typeof module === 'object' && typeof module.exports === 'object') {
@ -961,18 +961,44 @@ L.DomUtil = {
}, },
hasClass: function (el, name) { hasClass: function (el, name) {
return (el.className.length > 0) && if (el.classList !== undefined) {
new RegExp('(^|\\s)' + name + '(\\s|$)').test(el.className); return el.classList.contains(name);
}
var className = L.DomUtil._getClass(el);
return className.length > 0 && new RegExp('(^|\\s)' + name + '(\\s|$)').test(className);
}, },
addClass: function (el, name) { addClass: function (el, name) {
if (!L.DomUtil.hasClass(el, name)) { if (el.classList !== undefined) {
el.className += (el.className ? ' ' : '') + name; var classes = L.Util.splitWords(name);
for (var i = 0, len = classes.length; i < len; i++) {
el.classList.add(classes[i]);
}
} else if (!L.DomUtil.hasClass(el, name)) {
var className = L.DomUtil._getClass(el);
L.DomUtil._setClass(el, (className ? className + ' ' : '') + name);
} }
}, },
removeClass: function (el, name) { removeClass: function (el, name) {
el.className = L.Util.trim((' ' + el.className + ' ').replace(' ' + name + ' ', ' ')); if (el.classList !== undefined) {
el.classList.remove(name);
} else {
L.DomUtil._setClass(el, L.Util.trim((' ' + L.DomUtil._getClass(el) + ' ').replace(' ' + name + ' ', ' ')));
}
},
_setClass: function (el, name) {
if (el.className.baseVal === undefined) {
el.className = name;
} else {
// in case of SVG element
el.className.baseVal = name;
}
},
_getClass: function (el) {
return el.className.baseVal === undefined ? el.className : el.className.baseVal;
}, },
setOpacity: function (el, value) { setOpacity: function (el, value) {
@ -1637,7 +1663,7 @@ L.Map = L.Class.extend({
}, },
panBy: function (offset) { // (Point) panBy: function (offset) { // (Point)
// replaced with animated panBy in Map.Animation.js // replaced with animated panBy in Map.PanAnimation.js
this.fire('movestart'); this.fire('movestart');
this._rawPanBy(L.point(offset)); this._rawPanBy(L.point(offset));
@ -1646,63 +1672,29 @@ L.Map = L.Class.extend({
return this.fire('moveend'); return this.fire('moveend');
}, },
setMaxBounds: function (bounds, options) { setMaxBounds: function (bounds) {
bounds = L.latLngBounds(bounds); bounds = L.latLngBounds(bounds);
this.options.maxBounds = bounds; this.options.maxBounds = bounds;
if (!bounds) { if (!bounds) {
this._boundsMinZoom = null; return this.off('moveend', this._panInsideMaxBounds, this);
this.off('moveend', this._panInsideMaxBounds, this);
return this;
} }
var minZoom = this.getBoundsZoom(bounds, true);
this._boundsMinZoom = minZoom;
if (this._loaded) { if (this._loaded) {
if (this._zoom < minZoom) { this._panInsideMaxBounds();
this.setView(bounds.getCenter(), minZoom, options);
} else {
this.panInsideBounds(bounds);
}
} }
this.on('moveend', this._panInsideMaxBounds, this); return this.on('moveend', this._panInsideMaxBounds, this);
return this;
}, },
panInsideBounds: function (bounds) { panInsideBounds: function (bounds, options) {
bounds = L.latLngBounds(bounds); var center = this.getCenter(),
newCenter = this._limitCenter(center, this._zoom, bounds);
var viewBounds = this.getPixelBounds(), if (center.equals(newCenter)) { return this; }
viewSw = viewBounds.getBottomLeft(),
viewNe = viewBounds.getTopRight(),
sw = this.project(bounds.getSouthWest()),
ne = this.project(bounds.getNorthEast()),
dx = 0,
dy = 0;
if (viewNe.y < ne.y) { // north return this.panTo(newCenter, options);
dy = Math.ceil(ne.y - viewNe.y);
}
if (viewNe.x > ne.x) { // east
dx = Math.floor(ne.x - viewNe.x);
}
if (viewSw.y > sw.y) { // south
dy = Math.floor(sw.y - viewSw.y);
}
if (viewSw.x < sw.x) { // west
dx = Math.ceil(sw.x - viewSw.x);
}
if (dx || dy) {
return this.panBy([dx, dy]);
}
return this;
}, },
addLayer: function (layer) { addLayer: function (layer) {
@ -1787,10 +1779,6 @@ L.Map = L.Class.extend({
this._sizeChanged = true; this._sizeChanged = true;
this._initialCenter = null; this._initialCenter = null;
if (this.options.maxBounds) {
this.setMaxBounds(this.options.maxBounds);
}
if (!this._loaded) { return this; } if (!this._loaded) { return this; }
var newSize = this.getSize(), var newSize = this.getSize(),
@ -1810,9 +1798,12 @@ L.Map = L.Class.extend({
this.fire('move'); this.fire('move');
// make sure moveend is not fired too often on resize if (options.debounceMoveend) {
clearTimeout(this._sizeTimer); clearTimeout(this._sizeTimer);
this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200); this._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200);
} else {
this.fire('moveend');
}
} }
return this.fire('resize', { return this.fire('resize', {
@ -1885,9 +1876,9 @@ L.Map = L.Class.extend({
}, },
getMinZoom: function () { getMinZoom: function () {
var z1 = this._layersMinZoom === undefined ? 0 : this._layersMinZoom, return this.options.minZoom === undefined ?
z2 = this._boundsMinZoom === undefined ? 0 : this._boundsMinZoom; (this._layersMinZoom === undefined ? 0 : this._layersMinZoom) :
return this.options.minZoom === undefined ? Math.max(z1, z2) : this.options.minZoom; this.options.minZoom;
}, },
getMaxZoom: function () { getMaxZoom: function () {
@ -2210,7 +2201,7 @@ L.Map = L.Class.extend({
_onResize: function () { _onResize: function () {
L.Util.cancelAnimFrame(this._resizeRequest); L.Util.cancelAnimFrame(this._resizeRequest);
this._resizeRequest = L.Util.requestAnimFrame( this._resizeRequest = L.Util.requestAnimFrame(
this.invalidateSize, this, false, this._container); function () { this.invalidateSize({debounceMoveend: true}); }, this, false, this._container);
}, },
_onMouseClick: function (e) { _onMouseClick: function (e) {
@ -2312,6 +2303,46 @@ L.Map = L.Class.extend({
return this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint()); return this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());
}, },
// adjust center for view to get inside bounds
_limitCenter: function (center, zoom, bounds) {
if (!bounds) { return center; }
var centerPoint = this.project(center, zoom),
viewHalf = this.getSize().divideBy(2),
viewBounds = new L.Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),
offset = this._getBoundsOffset(viewBounds, bounds, zoom);
return this.unproject(centerPoint.add(offset), zoom);
},
// adjust offset for view to get inside bounds
_limitOffset: function (offset, bounds) {
if (!bounds) { return offset; }
var viewBounds = this.getPixelBounds(),
newBounds = new L.Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));
return offset.add(this._getBoundsOffset(newBounds, bounds));
},
// returns offset needed for pxBounds to get inside maxBounds at a specified zoom
_getBoundsOffset: function (pxBounds, maxBounds, zoom) {
var nwOffset = this.project(maxBounds.getNorthWest(), zoom).subtract(pxBounds.min),
seOffset = this.project(maxBounds.getSouthEast(), zoom).subtract(pxBounds.max),
dx = this._rebound(nwOffset.x, -seOffset.x),
dy = this._rebound(nwOffset.y, -seOffset.y);
return new L.Point(dx, dy);
},
_rebound: function (left, right) {
return left + right > 0 ?
Math.round(left - right) / 2 :
Math.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));
},
_limitZoom: function (zoom) { _limitZoom: function (zoom) {
var min = this.getMinZoom(), var min = this.getMinZoom(),
max = this.getMaxZoom(); max = this.getMaxZoom();
@ -2669,7 +2700,7 @@ L.TileLayer = L.Class.extend({
_getTileSize: function () { _getTileSize: function () {
var map = this._map, var map = this._map,
zoom = map.getZoom(), zoom = map.getZoom() + this.options.zoomOffset,
zoomN = this.options.maxNativeZoom, zoomN = this.options.maxNativeZoom,
tileSize = this.options.tileSize; tileSize = this.options.tileSize;
@ -2875,7 +2906,7 @@ L.TileLayer = L.Class.extend({
_getWrapTileNum: function () { _getWrapTileNum: function () {
var crs = this._map.options.crs, var crs = this._map.options.crs,
size = crs.getSize(this._getZoomForUrl()); size = crs.getSize(this._map.getZoom());
return size.divideBy(this.options.tileSize); return size.divideBy(this.options.tileSize);
}, },
@ -2922,6 +2953,11 @@ L.TileLayer = L.Class.extend({
if (L.Browser.ielt9 && this.options.opacity !== undefined) { if (L.Browser.ielt9 && this.options.opacity !== undefined) {
L.DomUtil.setOpacity(tile, this.options.opacity); L.DomUtil.setOpacity(tile, this.options.opacity);
} }
// without this hack, tiles disappear after zoom on Chrome for Android
// https://github.com/Leaflet/Leaflet/issues/2078
if (L.Browser.mobileWebkit3d) {
tile.style.WebkitBackfaceVisibility = 'hidden';
}
return tile; return tile;
}, },
@ -4413,6 +4449,15 @@ L.FeatureGroup = L.LayerGroup.extend({
return this.invoke('bindPopup', content, options); return this.invoke('bindPopup', content, options);
}, },
openPopup: function (latlng) {
// open popup on the first layer
for (var id in this._layers) {
this._layers[id].openPopup(latlng);
break;
}
return this;
},
setStyle: function (style) { setStyle: function (style) {
return this.invoke('setStyle', style); return this.invoke('setStyle', style);
}, },
@ -4622,6 +4667,11 @@ L.Path = L.Path.extend({
this._container = this._createElement('g'); this._container = this._createElement('g');
this._path = this._createElement('path'); this._path = this._createElement('path');
if (this.options.className) {
L.DomUtil.addClass(this._path, this.options.className);
}
this._container.appendChild(this._path); this._container.appendChild(this._path);
}, },
@ -4682,7 +4732,7 @@ L.Path = L.Path.extend({
_initEvents: function () { _initEvents: function () {
if (this.options.clickable) { if (this.options.clickable) {
if (L.Browser.svg || !L.Browser.vml) { if (L.Browser.svg || !L.Browser.vml) {
this._path.setAttribute('class', 'leaflet-clickable'); L.DomUtil.addClass(this._path, 'leaflet-clickable');
} }
L.DomEvent.on(this._container, 'click', this._onMouseClick, this); L.DomEvent.on(this._container, 'click', this._onMouseClick, this);
@ -4732,14 +4782,14 @@ L.Map.include({
this._panes.overlayPane.appendChild(this._pathRoot); this._panes.overlayPane.appendChild(this._pathRoot);
if (this.options.zoomAnimation && L.Browser.any3d) { if (this.options.zoomAnimation && L.Browser.any3d) {
this._pathRoot.setAttribute('class', ' leaflet-zoom-animated'); L.DomUtil.addClass(this._pathRoot, 'leaflet-zoom-animated');
this.on({ this.on({
'zoomanim': this._animatePathZoom, 'zoomanim': this._animatePathZoom,
'zoomend': this._endPathZoom 'zoomend': this._endPathZoom
}); });
} else { } else {
this._pathRoot.setAttribute('class', ' leaflet-zoom-hide'); L.DomUtil.addClass(this._pathRoot, 'leaflet-zoom-hide');
} }
this.on('moveend', this._updateSvgViewport); this.on('moveend', this._updateSvgViewport);
@ -4906,10 +4956,14 @@ L.Path = L.Browser.svg || !L.Browser.vml ? L.Path : L.Path.extend({
_initPath: function () { _initPath: function () {
var container = this._container = this._createElement('shape'); var container = this._container = this._createElement('shape');
L.DomUtil.addClass(container, 'leaflet-vml-shape');
L.DomUtil.addClass(container, 'leaflet-vml-shape' +
(this.options.className ? ' ' + this.options.className : ''));
if (this.options.clickable) { if (this.options.clickable) {
L.DomUtil.addClass(container, 'leaflet-clickable'); L.DomUtil.addClass(container, 'leaflet-clickable');
} }
container.coordsize = '1 1'; container.coordsize = '1 1';
this._path = this._createElement('path'); this._path = this._createElement('path');
@ -6685,9 +6739,8 @@ L.Draggable = L.Class.extend({
this._moved = true; this._moved = true;
this._startPos = L.DomUtil.getPosition(this._element).subtract(offset); this._startPos = L.DomUtil.getPosition(this._element).subtract(offset);
if (!L.Browser.touch) {
L.DomUtil.addClass(document.body, 'leaflet-dragging'); L.DomUtil.addClass(document.body, 'leaflet-dragging');
} L.DomUtil.addClass((e.target || e.srcElement), 'leaflet-drag-target');
} }
this._newPos = this._startPos.add(offset); this._newPos = this._startPos.add(offset);
@ -6703,10 +6756,9 @@ L.Draggable = L.Class.extend({
this.fire('drag'); this.fire('drag');
}, },
_onUp: function () { _onUp: function (e) {
if (!L.Browser.touch) {
L.DomUtil.removeClass(document.body, 'leaflet-dragging'); L.DomUtil.removeClass(document.body, 'leaflet-dragging');
} L.DomUtil.removeClass((e.target || e.srcElement), 'leaflet-drag-target');
for (var i in L.Draggable.MOVE) { for (var i in L.Draggable.MOVE) {
L.DomEvent L.DomEvent
@ -6898,6 +6950,8 @@ L.Map.Drag = L.Handler.extend({
map.fire('moveend'); map.fire('moveend');
} else { } else {
offset = map._limitOffset(offset, map.options.maxBounds);
L.Util.requestAnimFrame(function () { L.Util.requestAnimFrame(function () {
map.panBy(offset, { map.panBy(offset, {
duration: decelerationDuration, duration: decelerationDuration,
@ -6932,7 +6986,7 @@ L.Map.DoubleClickZoom = L.Handler.extend({
_onDoubleClick: function (e) { _onDoubleClick: function (e) {
var map = this._map, var map = this._map,
zoom = map.getZoom() + 1; zoom = map.getZoom() + (e.originalEvent.shiftKey ? -1 : 1);
if (map.options.doubleClickZoom === 'center') { if (map.options.doubleClickZoom === 'center') {
map.setZoom(zoom); map.setZoom(zoom);
@ -7550,21 +7604,22 @@ L.Map.BoxZoom = L.Handler.extend({
this._startLayerPoint = this._map.mouseEventToLayerPoint(e); this._startLayerPoint = this._map.mouseEventToLayerPoint(e);
L.DomEvent
.on(document, 'mousemove', this._onMouseMove, this)
.on(document, 'mouseup', this._onMouseUp, this)
.on(document, 'keydown', this._onKeyDown, this);
},
_onMouseMove: function (e) {
if (!this._moved) {
this._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._pane); this._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._pane);
L.DomUtil.setPosition(this._box, this._startLayerPoint); L.DomUtil.setPosition(this._box, this._startLayerPoint);
//TODO refactor: move cursor to styles //TODO refactor: move cursor to styles
this._container.style.cursor = 'crosshair'; this._container.style.cursor = 'crosshair';
L.DomEvent
.on(document, 'mousemove', this._onMouseMove, this)
.on(document, 'mouseup', this._onMouseUp, this)
.on(document, 'keydown', this._onKeyDown, this);
this._map.fire('boxzoomstart'); this._map.fire('boxzoomstart');
}, }
_onMouseMove: function (e) {
var startPoint = this._startLayerPoint, var startPoint = this._startLayerPoint,
box = this._box, box = this._box,
@ -7585,8 +7640,10 @@ L.Map.BoxZoom = L.Handler.extend({
}, },
_finish: function () { _finish: function () {
if (this._moved) {
this._pane.removeChild(this._box); this._pane.removeChild(this._box);
this._container.style.cursor = ''; this._container.style.cursor = '';
}
L.DomUtil.enableTextSelection(); L.DomUtil.enableTextSelection();
L.DomUtil.enableImageDrag(); L.DomUtil.enableImageDrag();
@ -7821,7 +7878,6 @@ L.Handler.MarkerDrag = L.Handler.extend({
.closePopup() .closePopup()
.fire('movestart') .fire('movestart')
.fire('dragstart'); .fire('dragstart');
L.DomUtil.addClass(this._marker._icon, 'leaflet-marker-dragging');
}, },
_onDrag: function () { _onDrag: function () {
@ -7846,7 +7902,6 @@ L.Handler.MarkerDrag = L.Handler.extend({
this._marker this._marker
.fire('moveend') .fire('moveend')
.fire('dragend', e); .fire('dragend', e);
L.DomUtil.removeClass(this._marker._icon, 'leaflet-marker-dragging');
} }
}); });
@ -8086,6 +8141,12 @@ L.Control.Attribution = L.Control.extend({
this._container = L.DomUtil.create('div', 'leaflet-control-attribution'); this._container = L.DomUtil.create('div', 'leaflet-control-attribution');
L.DomEvent.disableClickPropagation(this._container); L.DomEvent.disableClickPropagation(this._container);
for (var i in map._layers) {
if (map._layers[i].getAttribution) {
this.addAttribution(map._layers[i].getAttribution());
}
}
map map
.on('layeradd', this._onLayerAdd, this) .on('layeradd', this._onLayerAdd, this)
.on('layerremove', this._onLayerRemove, this); .on('layerremove', this._onLayerRemove, this);
@ -8656,7 +8717,7 @@ L.Map.include({
setView: function (center, zoom, options) { setView: function (center, zoom, options) {
zoom = zoom === undefined ? this._zoom : this._limitZoom(zoom); zoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);
center = L.latLng(center); center = this._limitCenter(L.latLng(center), zoom, this.options.maxBounds);
options = options || {}; options = options || {};
if (this._panAnim) { if (this._panAnim) {

68
external/leaflet.css vendored
View File

@ -42,10 +42,6 @@
.leaflet-container img.leaflet-image-layer { .leaflet-container img.leaflet-image-layer {
max-width: 15000px !important; max-width: 15000px !important;
} }
/* Android chrome makes tiles disappear without this */
.leaflet-tile-container img {
-webkit-backface-visibility: hidden;
}
.leaflet-tile { .leaflet-tile {
filter: inherit; filter: inherit;
visibility: hidden; visibility: hidden;
@ -174,9 +170,8 @@
.leaflet-control { .leaflet-control {
cursor: auto; cursor: auto;
} }
.leaflet-dragging, .leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-clickable, .leaflet-dragging .leaflet-clickable {
.leaflet-dragging .leaflet-container {
cursor: move; cursor: move;
cursor: -webkit-grabbing; cursor: -webkit-grabbing;
cursor: -moz-grabbing; cursor: -moz-grabbing;
@ -210,8 +205,7 @@
/* general toolbar styles */ /* general toolbar styles */
.leaflet-bar { .leaflet-bar {
box-shadow: 0 1px 7px rgba(0,0,0,0.65); box-shadow: 0 1px 5px rgba(0,0,0,0.65);
-webkit-border-radius: 4px;
border-radius: 4px; border-radius: 4px;
} }
.leaflet-bar a, .leaflet-bar a,
@ -236,15 +230,11 @@
background-color: #f4f4f4; background-color: #f4f4f4;
} }
.leaflet-bar a:first-child { .leaflet-bar a:first-child {
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px; border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
} }
.leaflet-bar a:last-child { .leaflet-bar a:last-child {
-webkit-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom: none; border-bottom: none;
} }
@ -254,54 +244,37 @@
color: #bbb; color: #bbb;
} }
.leaflet-touch .leaflet-bar {
-webkit-border-radius: 10px;
border-radius: 10px;
}
.leaflet-touch .leaflet-bar a { .leaflet-touch .leaflet-bar a {
width: 30px; width: 30px;
height: 30px; height: 30px;
} line-height: 30px;
.leaflet-touch .leaflet-bar a:first-child {
-webkit-border-top-left-radius: 7px;
border-top-left-radius: 7px;
-webkit-border-top-right-radius: 7px;
border-top-right-radius: 7px;
}
.leaflet-touch .leaflet-bar a:last-child {
-webkit-border-bottom-left-radius: 7px;
border-bottom-left-radius: 7px;
-webkit-border-bottom-right-radius: 7px;
border-bottom-right-radius: 7px;
border-bottom: none;
} }
/* zoom control */ /* zoom control */
.leaflet-control-zoom-in { .leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace; font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
} }
.leaflet-control-zoom-out { .leaflet-control-zoom-out {
font: bold 22px 'Lucida Console', Monaco, monospace; font-size: 20px;
} }
.leaflet-touch .leaflet-control-zoom-in { .leaflet-touch .leaflet-control-zoom-in {
font-size: 22px; font-size: 22px;
line-height: 30px;
} }
.leaflet-touch .leaflet-control-zoom-out { .leaflet-touch .leaflet-control-zoom-out {
font-size: 28px; font-size: 24px;
line-height: 30px;
} }
/* layers control */ /* layers control */
.leaflet-control-layers { .leaflet-control-layers {
box-shadow: 0 1px 7px rgba(0,0,0,0.4); box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff; background: #fff;
-webkit-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
} }
.leaflet-control-layers-toggle { .leaflet-control-layers-toggle {
@ -310,7 +283,7 @@
height: 36px; height: 36px;
} }
.leaflet-retina .leaflet-control-layers-toggle { .leaflet-retina .leaflet-control-layers-toggle {
background-image: url(@@INCLUDEIMATE:images/layers-2x.png@@); background-image: url(@@INCLUDEIMAGE:images/layers-2x.png@@);
background-size: 26px 26px; background-size: 26px 26px;
} }
.leaflet-touch .leaflet-control-layers-toggle { .leaflet-touch .leaflet-control-layers-toggle {
@ -350,7 +323,6 @@
.leaflet-container .leaflet-control-attribution { .leaflet-container .leaflet-control-attribution {
background: #fff; background: #fff;
background: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.7);
box-shadow: 0 0 5px #bbb;
margin: 0; margin: 0;
} }
.leaflet-control-attribution, .leaflet-control-attribution,
@ -358,6 +330,12 @@
padding: 0 5px; padding: 0 5px;
color: #333; color: #333;
} }
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover {
text-decoration: underline;
}
.leaflet-container .leaflet-control-attribution, .leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale { .leaflet-container .leaflet-control-scale {
font-size: 11px; font-size: 11px;
@ -379,17 +357,13 @@
-moz-box-sizing: content-box; -moz-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
color: black;
background: #fff; background: #fff;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
text-shadow: 1px 1px 1px #fff;
} }
.leaflet-control-scale-line:not(:first-child) { .leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777; border-top: 2px solid #777;
border-bottom: none; border-bottom: none;
margin-top: -2px; margin-top: -2px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
} }
.leaflet-control-scale-line:not(:first-child):not(:last-child) { .leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777; border-bottom: 2px solid #777;
@ -402,7 +376,8 @@
} }
.leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar { .leaflet-touch .leaflet-bar {
border: 4px solid rgba(0,0,0,0.3); border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
} }
@ -415,7 +390,6 @@
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
padding: 1px; padding: 1px;
text-align: left; text-align: left;
-webkit-border-radius: 12px;
border-radius: 12px; border-radius: 12px;
} }
.leaflet-popup-content { .leaflet-popup-content {
@ -502,7 +476,3 @@
background: #fff; background: #fff;
border: 1px solid #666; border: 1px solid #666;
} }
.leaflet-editing-icon {
-webkit-border-radius: 2px;
border-radius: 2px;
}

8
external/leaflet.js vendored

File diff suppressed because one or more lines are too long