Move the Wikipedia layer into its own "Overlays" panel
Wikipedia doesn't belong inside "Tracks & Points" — that panel is for files you add/remove/reorder, while Wikipedia is a live layer with nothing to manage, just on/off. Gave it its own sidebar panel (#overlays-panel, same shell as LiveTrackPanelControl) instead, sized to hold more such checklist-only layers later without a redesign. Moved all the wiki layer logic out of GpxPanelControl into a new OverlaysControl (public/js/overlays.js). svgToImageData/badgeImageId/ escapeHtml are now exported from gpx.js so it doesn't have to reimplement them — the same three helpers a second overlay would also need.
This commit is contained in:
1 parent
787df5478d
commit
c5b4a9ffb2
6 files changed
+257
-187
No files matched your search
+21
-15
@@ -373,21 +373,6 @@ html, body {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.gpx-panel__wiki {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin: 0 12px 8px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.gpx-panel__wiki[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gpx-tree {
|
||||
/* flex:1 (not just overflow-y) so the tree fills the rest of the panel
|
||||
even when short/empty — otherwise the blank space below it wouldn't
|
||||
@@ -1189,6 +1174,27 @@ html, body {
|
||||
box-shadow: 0 0 0 2px rgba(42, 157, 143, 0.4);
|
||||
}
|
||||
|
||||
.overlays-panel__list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.overlays-panel__item label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 4px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.overlays-panel__item label:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
.livetrack-panel__list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in new issue
Block a user