commit 736b25f3a61008feb724b011c15633417c55770d
parent 76c0f3795bc7464d24a9e95a5d108452d093a095
Author: Sergey Orlov <wladimirych@gmail.com>
Date: Sun, 24 May 2020 22:48:33 +0200
elevation profile: fix bug - do not restore selection aftter zoom and resize
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/leaflet.control.elevation-profile/index.js b/src/lib/leaflet.control.elevation-profile/index.js
@@ -252,6 +252,7 @@ const ElevationProfile = L.Class.extend({
this.selEndInd = this.values.length - 1;
}
this.updateGraphSelection();
+ L.DomUtil.removeClass(this.graphSelection, 'elevation-profile-cursor-hidden');
},
updateGraphSelection: function() {
@@ -259,7 +260,6 @@ const ElevationProfile = L.Class.extend({
const selEnd = this.selEndInd * (this.svgWidth - 1) / (this.values.length - 1);
this.graphSelection.style.left = selStart + 'px';
this.graphSelection.style.width = (selEnd - selStart) + 'px';
- L.DomUtil.removeClass(this.graphSelection, 'elevation-profile-cursor-hidden');
},
onSvgDragEnd: function(e) {