Center the tooltip (arrow) for bottom position

This commit is contained in:
David Larlet 2023-10-27 11:32:03 -04:00
parent 1d65ce6b49
commit 860e475219
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
2 changed files with 2 additions and 3 deletions

View file

@ -792,7 +792,6 @@ input:invalid {
pointer-events: none; pointer-events: none;
border-top-color: rgba(30, 30, 30, 0.7); border-top-color: rgba(30, 30, 30, 0.7);
border-width: 11px; border-width: 11px;
margin-left: calc(-50% + 21px);
transform: rotate(180deg); transform: rotate(180deg);
} }
#umap-tooltip-container.tooltip.tooltip-left:after { #umap-tooltip-container.tooltip.tooltip-left:after {

View file

@ -185,8 +185,8 @@ L.U.UI = L.Evented.extend({
this._tooltip.className = 'tooltip-bottom' this._tooltip.className = 'tooltip-bottom'
const coords = this.getPosition(el) const coords = this.getPosition(el)
this.setTooltipPosition({ this.setTooltipPosition({
left: coords.left + 30, left: coords.left,
bottom: this.getDocHeight() - coords.top - 76, top: coords.bottom + 11,
}) })
}, },