nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit d2e8b1ab5627d3047ff7d30ba725fa6a8dea96b2
parent 9c95e3ffdd1b054df063e015d81c91eec9256695
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Mon,  5 Nov 2018 21:24:22 +0100

[tracks] highlight row in track list when mouse over waypoint on map #135

Diffstat:
Msrc/lib/leaflet.control.track-list/track-list.js | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/lib/leaflet.control.track-list/track-list.js b/src/lib/leaflet.control.track-list/track-list.js @@ -130,6 +130,8 @@ L.Control.TrackList = L.Control.extend({ printTransparent: true }).addTo(map); this._markerLayer.on('markerclick markercontextmenu', this.onMarkerClick, this); + this._markerLayer.on('markerenter', this.onMarkerEnter, this); + this._markerLayer.on('markerleave', this.onMarkerLeave, this); map.on('resize', this._setAdaptiveHeight, this); setTimeout(() => this._setAdaptiveHeight(), 0); return container; @@ -982,6 +984,14 @@ L.Control.TrackList = L.Control.extend({ ).show(e); }, + onMarkerEnter: function(e) { + e.marker._parentTrack.hover(true); + }, + + onMarkerLeave: function(e) { + e.marker._parentTrack.hover(false); + }, + removePoint: function(marker) { this.stopPlacingPoint(); this._markerLayer.removeMarker(marker);