fix controls regression
This commit is contained in:
parent
d6d35c0f19
commit
d728779bc6
16
dist/leaflet-src.js
vendored
16
dist/leaflet-src.js
vendored
@ -5127,6 +5127,9 @@ L.Handler.PolyEdit = L.Handler.extend({
|
|||||||
marker._index = index;
|
marker._index = index;
|
||||||
|
|
||||||
marker.on('drag', this._onMarkerDrag, this);
|
marker.on('drag', this._onMarkerDrag, this);
|
||||||
|
marker.on('dragend', function () {
|
||||||
|
this._poly.fire('edit');
|
||||||
|
}, this);
|
||||||
|
|
||||||
this._markerGroup.addLayer(marker);
|
this._markerGroup.addLayer(marker);
|
||||||
|
|
||||||
@ -5192,7 +5195,6 @@ L.Handler.PolyEdit = L.Handler.extend({
|
|||||||
|
|
||||||
this._poly.spliceLatLngs(i, 0, latlng);
|
this._poly.spliceLatLngs(i, 0, latlng);
|
||||||
this._markers.splice(i, 0, marker);
|
this._markers.splice(i, 0, marker);
|
||||||
this._poly.fire('edit');
|
|
||||||
|
|
||||||
marker.setOpacity(1);
|
marker.setOpacity(1);
|
||||||
|
|
||||||
@ -5213,6 +5215,7 @@ L.Handler.PolyEdit = L.Handler.extend({
|
|||||||
function onClick() {
|
function onClick() {
|
||||||
onDragStart.call(this);
|
onDragStart.call(this);
|
||||||
onDragEnd.call(this);
|
onDragEnd.call(this);
|
||||||
|
this._poly.fire('edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
marker
|
marker
|
||||||
@ -5302,13 +5305,14 @@ L.Map.include({
|
|||||||
bottom = 'leaflet-bottom',
|
bottom = 'leaflet-bottom',
|
||||||
left = 'leaflet-left',
|
left = 'leaflet-left',
|
||||||
right = 'leaflet-right',
|
right = 'leaflet-right',
|
||||||
container = L.DomUtil.create('div', 'leaflet-control-container', this._container),
|
corner = 'leaflet-corner',
|
||||||
|
container = this._container,
|
||||||
corners = this._controlCorners = {};
|
corners = this._controlCorners = {};
|
||||||
|
|
||||||
corners.topleft = L.DomUtil.create('div', top + ' ' + left, container);
|
corners.topleft = L.DomUtil.create('div', [corner, top, left].join(' '), container);
|
||||||
corners.topright = L.DomUtil.create('div', top + ' ' + right, container);
|
corners.topright = L.DomUtil.create('div', [corner, top, right].join(' '), container);
|
||||||
corners.bottomleft = L.DomUtil.create('div', bottom + ' ' + left, container);
|
corners.bottomleft = L.DomUtil.create('div', [corner, bottom, left].join(' '), container);
|
||||||
corners.bottomright = L.DomUtil.create('div', bottom + ' ' + right, container);
|
corners.bottomright = L.DomUtil.create('div', [corner, bottom, right].join(' '), container);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
5
dist/leaflet.css
vendored
5
dist/leaflet.css
vendored
@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
.leaflet-tile-pane,
|
.leaflet-tile-pane,
|
||||||
.leaflet-container,
|
.leaflet-container,
|
||||||
.leaflet-control-container,
|
.leaflet-corner,
|
||||||
.leaflet-popup {
|
.leaflet-popup {
|
||||||
/* TODO make this configurable */
|
/* TODO make this configurable */
|
||||||
-webkit-transform: translate3d(0,0,0);
|
-webkit-transform: translate3d(0,0,0);
|
||||||
@ -82,9 +82,6 @@ a.leaflet-active {
|
|||||||
|
|
||||||
/* Leaflet controls */
|
/* Leaflet controls */
|
||||||
|
|
||||||
.leaflet-control-container {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.leaflet-control {
|
.leaflet-control {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 7;
|
z-index: 7;
|
||||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
@ -72,9 +72,9 @@ L.Handler.PolyEdit = L.Handler.extend({
|
|||||||
marker._index = index;
|
marker._index = index;
|
||||||
|
|
||||||
marker.on('drag', this._onMarkerDrag, this);
|
marker.on('drag', this._onMarkerDrag, this);
|
||||||
marker.on('dragend', function() {
|
marker.on('dragend', function () {
|
||||||
this._poly.fire('edit');
|
this._poly.fire('edit');
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this._markerGroup.addLayer(marker);
|
this._markerGroup.addLayer(marker);
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ L.Handler.PolyEdit = L.Handler.extend({
|
|||||||
function onClick() {
|
function onClick() {
|
||||||
onDragStart.call(this);
|
onDragStart.call(this);
|
||||||
onDragEnd.call(this);
|
onDragEnd.call(this);
|
||||||
this._poly.fire('edit');
|
this._poly.fire('edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
marker
|
marker
|
||||||
|
@ -36,12 +36,13 @@ L.Map.include({
|
|||||||
bottom = 'leaflet-bottom',
|
bottom = 'leaflet-bottom',
|
||||||
left = 'leaflet-left',
|
left = 'leaflet-left',
|
||||||
right = 'leaflet-right',
|
right = 'leaflet-right',
|
||||||
container = L.DomUtil.create('div', 'leaflet-control-container', this._container),
|
corner = 'leaflet-corner',
|
||||||
|
container = this._container,
|
||||||
corners = this._controlCorners = {};
|
corners = this._controlCorners = {};
|
||||||
|
|
||||||
corners.topleft = L.DomUtil.create('div', top + ' ' + left, container);
|
corners.topleft = L.DomUtil.create('div', [corner, top, left].join(' '), container);
|
||||||
corners.topright = L.DomUtil.create('div', top + ' ' + right, container);
|
corners.topright = L.DomUtil.create('div', [corner, top, right].join(' '), container);
|
||||||
corners.bottomleft = L.DomUtil.create('div', bottom + ' ' + left, container);
|
corners.bottomleft = L.DomUtil.create('div', [corner, bottom, left].join(' '), container);
|
||||||
corners.bottomright = L.DomUtil.create('div', bottom + ' ' + right, container);
|
corners.bottomright = L.DomUtil.create('div', [corner, bottom, right].join(' '), container);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user