commit 2dafe9016f8c95e798f6fda9f84a90f2b6fab772
parent d2e8b1ab5627d3047ff7d30ba725fa6a8dea96b2
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Mon, 5 Nov 2018 23:02:52 +0100
[track edit] do not highkight track and show tooltip with touch interface #135
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/lib/leaflet.control.track-list/track-list.js b/src/lib/leaflet.control.track-list/track-list.js
@@ -915,7 +915,9 @@ L.Control.TrackList = L.Control.extend({
track.visible.subscribe(this.onTrackVisibilityChanged.bind(this, track));
track.measureTicksShown.subscribe(this.setTrackMeasureTicksVisibility.bind(this, track));
track.color.subscribe(this.onTrackColorChanged.bind(this, track));
- track.feature.bindTooltip(() => track.name(), {sticky: true});
+ if (!L.Browser.touch) {
+ track.feature.bindTooltip(() => track.name(), {sticky: true});
+ }
//this.onTrackColorChanged(track);
this.onTrackVisibilityChanged(track);
@@ -925,7 +927,10 @@ L.Control.TrackList = L.Control.extend({
return track;
},
- highLightTrack: function(track) {
+ highLightTrack: function(track, e) {
+ if (L.Browser.touch) {
+ return;
+ }
if (this._trackHighlight) {
this._trackHighlight.removeFrom(this._map);
this._trackHighlight = null;