mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 11:32:38 +02:00
feat: make the tooltip sticky in hover mode for paths (#2507)
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:
commit
fb6df6f955
1 changed files with 5 additions and 0 deletions
|
@ -293,6 +293,11 @@ const PathMixin = {
|
||||||
this.on('popupclose', this._redraw)
|
this.on('popupclose', this._redraw)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
bindTooltip: function (content, options) {
|
||||||
|
options.sticky = !options.permanent
|
||||||
|
this.parentClass.prototype.bindTooltip.call(this, content, options)
|
||||||
|
},
|
||||||
|
|
||||||
highlightPath: function () {
|
highlightPath: function () {
|
||||||
this.parentClass.prototype.setStyle.call(this, {
|
this.parentClass.prototype.setStyle.call(this, {
|
||||||
fillOpacity: Math.sqrt(this.feature.getDynamicOption('fillOpacity', 1.0)),
|
fillOpacity: Math.sqrt(this.feature.getDynamicOption('fillOpacity', 1.0)),
|
||||||
|
|
Loading…
Reference in a new issue