Fix leaflet elevation plugin
This commit is contained in:
9
script/leaflet.min.js
vendored
9
script/leaflet.min.js
vendored
@@ -124,7 +124,7 @@ L.Control.Elevation = L.Control.extend({
|
||||
.style("stroke", "none")
|
||||
.style("pointer-events", "all");
|
||||
|
||||
if (L.Browser.touch) {
|
||||
if (L.Browser.mobile) { //https://github.com/MrMufflon/Leaflet.Elevation/commit/971d6b81cf2993c0333b30eee58fa48183478593
|
||||
|
||||
background.on("touchmove.drag", this._dragHandler.bind(this)).
|
||||
on("touchstart.drag", this._dragStartHandler.bind(this)).
|
||||
@@ -319,7 +319,7 @@ L.Control.Elevation = L.Control.extend({
|
||||
.disableClickPropagation(container);
|
||||
//.disableScrollPropagation(container);
|
||||
|
||||
if (L.Browser.touch) {
|
||||
if (L.Browser.mobile) {
|
||||
L.DomEvent.on(container, 'click', L.DomEvent.stopPropagation);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ L.Control.Elevation = L.Control.extend({
|
||||
link.href = '#';
|
||||
link.title = this.options.controlButton.title;
|
||||
|
||||
if (L.Browser.touch) {
|
||||
if (L.Browser.mobile) {
|
||||
L.DomEvent
|
||||
.on(link, 'click', L.DomEvent.stop)
|
||||
.on(link, 'click', this._expand, this);
|
||||
@@ -514,7 +514,8 @@ L.Control.Elevation = L.Control.extend({
|
||||
|
||||
if (!this._mouseHeightFocus) {
|
||||
|
||||
var heightG = d3.select(".leaflet-overlay-pane svg")
|
||||
var heightG = d3.select(this._map.getContainer())
|
||||
.select(".leaflet-overlay-pane svg") //https://github.com/MrMufflon/Leaflet.Elevation/commit/bb4ea158b87f99c4a8f50af50d7ccf6f8ed45661
|
||||
.append("g");
|
||||
this._mouseHeightFocus = heightG.append('svg:line')
|
||||
.attr("class", opts.theme + " height-focus line")
|
||||
|
||||
Reference in New Issue
Block a user