Search: highlight the found spot, open a waypoint's popup, full-height list
A point result (typed coordinates, a geocoded place, a waypoint) leaves a pulsing marker on the map until the next jump or a click on it. A result from a layer opens that point's popup as if clicked on the map. The panel grows to the window height so long result lists fit.
This commit is contained in:
1 parent
81e688be9b
commit
ba9c40ac3d
4 files changed
+76
-17
No files matched your search
+30
-1
@@ -1261,6 +1261,12 @@ html, body {
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
padding: 6px 8px;
|
||||
font-size: 13px;
|
||||
/* Grows with its results up to the window's height (it opens ~10px
|
||||
below the 44px topbar), then only the result list scrolls. */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: calc(100vh - 70px);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.search-panel[hidden] {
|
||||
@@ -1280,7 +1286,8 @@ html, body {
|
||||
list-style: none;
|
||||
margin: 6px 0 0;
|
||||
padding: 0;
|
||||
max-height: 220px;
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -1308,6 +1315,28 @@ html, body {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* Pulsing ring left on the map where a point search result landed. */
|
||||
.search-highlight {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border: 3px solid #e2442f;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 2px #fff;
|
||||
cursor: pointer;
|
||||
animation: search-highlight-pulse 1.4s ease-out infinite;
|
||||
}
|
||||
|
||||
@keyframes search-highlight-pulse {
|
||||
0% { box-shadow: 0 0 0 2px #fff, 0 0 0 2px rgba(226, 68, 47, 0.6); }
|
||||
100% { box-shadow: 0 0 0 2px #fff, 0 0 0 16px rgba(226, 68, 47, 0); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.search-highlight {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.search-panel__where {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
|
||||
Reference in new issue
Block a user