diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 2d4980bb..ac99a831 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -2225,21 +2225,25 @@ def leaflet_chart_compare(course,workoutids,labeldict={},startenddict={}): script += """ var latlongs = {scoordinates} var polyline = L.polyline(latlongs, {{color:'{color}'}}).addTo(mymap) - polyline.bindPopup("{label}") + polyline.bindPopup("{label}",{{ autoPan: false, autoClose: false }}).openPopup() polyline.on('mouseover',function(ev) {{ ev.target.openPopup(); }}); + polyline.on('dblclick', function (e) {{ + mymap.removeLayer(this); + }}); mymap.fitBounds(polyline.getBounds()) """.format( scoordinates=scoordinates, color=color, - label=label + label=label, + id=id, ) script += """ - """ + """ diff --git a/rowers/templates/mapcompare.html b/rowers/templates/mapcompare.html index 9791b74b..db678501 100644 --- a/rowers/templates/mapcompare.html +++ b/rowers/templates/mapcompare.html @@ -17,7 +17,9 @@ Bokeh.set_log_level("info"); -

Interactive Comparison

+

Course Map Comparison

+ +

Click on a line to see the label. Double click on a line to remove it. Reload to get back all lines.

diff --git a/rowers/templates/virtualevent.html b/rowers/templates/virtualevent.html index 86e61402..3b8c6c57 100644 --- a/rowers/templates/virtualevent.html +++ b/rowers/templates/virtualevent.html @@ -377,6 +377,10 @@

Compare Results + {% if race.sessiontype == 'race' %} + Compare Course + {% endif %}

{% if race.manager == request.user %}