Skip to content

Commit

Permalink
combined tooltip update for lines
Browse files Browse the repository at this point in the history
  • Loading branch information
balladaniel committed Dec 22, 2023
1 parent 513b7db commit 890ab36
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/combined.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,26 @@
layer.on('mousemove',e=>{
e.target.getTooltip().setLatLng(e.latlng);
});

// line highlighting
var origstyle;
function highlight(e) {
origstyle = {
weight: e.target.options.weight,
color: e.target.options.color
}
e.target.setStyle({
color: '#f22',
});
}
function resetStyle(e) {
e.target.setStyle(origstyle);
}
layer.on({
mouseover: highlight,
mouseout: resetStyle
});
// line highlighting end
}
window.testdata3 = L.dataClassification(d, {
mode: 'quantile',
Expand Down

0 comments on commit 890ab36

Please sign in to comment.