mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
feat: make the tooltip sticky in hover mode for paths
Until now, it was displayed on the path (line or polygon) "center". So when zoomed in, if the center is not on the screen, the tooltip will not be visible.
This commit is contained in:
parent
c71a6aafdb
commit
04966cc068
1 changed files with 5 additions and 0 deletions
|
@ -293,6 +293,11 @@ const PathMixin = {
|
|||
this.on('popupclose', this._redraw)
|
||||
},
|
||||
|
||||
bindTooltip: function (content, options) {
|
||||
options.sticky = !options.permanent
|
||||
this.parentClass.prototype.bindTooltip.call(this, content, options)
|
||||
},
|
||||
|
||||
highlightPath: function () {
|
||||
this.parentClass.prototype.setStyle.call(this, {
|
||||
fillOpacity: Math.sqrt(this.feature.getDynamicOption('fillOpacity', 1.0)),
|
||||
|
|
Loading…
Reference in a new issue