fix controls regression

This commit is contained in:
mourner 2012-02-23 10:47:19 +02:00
parent d6d35c0f19
commit d728779bc6
5 changed files with 22 additions and 20 deletions

16
dist/leaflet-src.js vendored
View File

@ -5127,6 +5127,9 @@ L.Handler.PolyEdit = L.Handler.extend({
marker._index = index;
marker.on('drag', this._onMarkerDrag, this);
marker.on('dragend', function () {
this._poly.fire('edit');
}, this);
this._markerGroup.addLayer(marker);
@ -5192,7 +5195,6 @@ L.Handler.PolyEdit = L.Handler.extend({
this._poly.spliceLatLngs(i, 0, latlng);
this._markers.splice(i, 0, marker);
this._poly.fire('edit');
marker.setOpacity(1);
@ -5213,6 +5215,7 @@ L.Handler.PolyEdit = L.Handler.extend({
function onClick() {
onDragStart.call(this);
onDragEnd.call(this);
this._poly.fire('edit');
}
marker
@ -5302,13 +5305,14 @@ L.Map.include({
bottom = 'leaflet-bottom',
left = 'leaflet-left',
right = 'leaflet-right',
container = L.DomUtil.create('div', 'leaflet-control-container', this._container),
corner = 'leaflet-corner',
container = this._container,
corners = this._controlCorners = {};
corners.topleft = L.DomUtil.create('div', top + ' ' + left, container);
corners.topright = L.DomUtil.create('div', top + ' ' + right, container);
corners.bottomleft = L.DomUtil.create('div', bottom + ' ' + left, container);
corners.bottomright = L.DomUtil.create('div', bottom + ' ' + right, container);
corners.topleft = L.DomUtil.create('div', [corner, top, left].join(' '), container);
corners.topright = L.DomUtil.create('div', [corner, top, right].join(' '), container);
corners.bottomleft = L.DomUtil.create('div', [corner, bottom, left].join(' '), container);
corners.bottomright = L.DomUtil.create('div', [corner, bottom, right].join(' '), container);
}
});

5
dist/leaflet.css vendored
View File

@ -19,7 +19,7 @@
}
.leaflet-tile-pane,
.leaflet-container,
.leaflet-control-container,
.leaflet-corner,
.leaflet-popup {
/* TODO make this configurable */
-webkit-transform: translate3d(0,0,0);
@ -82,9 +82,6 @@ a.leaflet-active {
/* Leaflet controls */
.leaflet-control-container {
height: 100%;
}
.leaflet-control {
position: relative;
z-index: 7;

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long

View File

@ -36,12 +36,13 @@ L.Map.include({
bottom = 'leaflet-bottom',
left = 'leaflet-left',
right = 'leaflet-right',
container = L.DomUtil.create('div', 'leaflet-control-container', this._container),
corner = 'leaflet-corner',
container = this._container,
corners = this._controlCorners = {};
corners.topleft = L.DomUtil.create('div', top + ' ' + left, container);
corners.topright = L.DomUtil.create('div', top + ' ' + right, container);
corners.bottomleft = L.DomUtil.create('div', bottom + ' ' + left, container);
corners.bottomright = L.DomUtil.create('div', bottom + ' ' + right, container);
corners.topleft = L.DomUtil.create('div', [corner, top, left].join(' '), container);
corners.topright = L.DomUtil.create('div', [corner, top, right].join(' '), container);
corners.bottomleft = L.DomUtil.create('div', [corner, bottom, left].join(' '), container);
corners.bottomright = L.DomUtil.create('div', [corner, bottom, right].join(' '), container);
}
});