Hyperlink popup: Remove extra space and fix ellipsis

Increase the max-width from 188 to 150 for the anchor element so,
we don't have the extra space (when the url is short) at the end
of the popup (after the icons)

Fix the overflow and consequent ellipsis: it shouldn't limit/affect
the icons but the anchor (hyperlink)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2d0f8d2918827bef142f05a483da510d573481d3
This commit is contained in:
Pedro Pinto Silva 2022-11-23 12:11:43 +01:00 committed by pedropintosilva
parent 5c3098bda5
commit b523f1ed92
2 changed files with 3 additions and 4 deletions

View file

@ -867,8 +867,6 @@ nav.spreadsheet-color-indicator ~ #sidebar-dock-wrapper {
.hyperlink-popup .leaflet-popup-content {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 6px 8px;
font-size: 14px;
line-height: 1;
@ -878,6 +876,9 @@ nav.spreadsheet-color-indicator ~ #sidebar-dock-wrapper {
padding: 6px 0;
display: inline-block;
line-height: 1;
overflow: hidden;
text-overflow: ellipsis;
max-width: 188px;
}
.hyperlink-popup-btn {

View file

@ -2444,8 +2444,6 @@ L.CanvasTileLayer = L.Layer.extend({
.setContent(linkOuterHtml)
.setLatLng(position)
.openOn(this._map);
document.getElementById('hyperlink-pop-up').style.maxWidth = '150px';
document.getElementById('hyperlink-pop-up').style.overflow = 'hidden';
var offsetDiffTop = $('.hyperlink-popup').offset().top - $('#map').offset().top;
var offsetDiffLeft = $('.hyperlink-popup').offset().left - $('#map').offset().left;
if (offsetDiffTop < 10) this._movePopUpBelow();