Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style(geomap): hold everything over the map off its edges by the same room
Elian Doran17ab96c4a4fe
diff --git a/apps/client/src/widgets/collections/geomap/MapToolbar.css b/apps/client/src/widgets/collections/geomap/MapToolbar.cssindex fd14ad9407..8471e0d6d4 100644--- a/apps/client/src/widgets/collections/geomap/MapToolbar.css+++ b/apps/client/src/widgets/collections/geomap/MapToolbar.css@@ -4,15 +4,15 @@* the top corner MapLibre keeps its zoom buttons in. The corner is the map's to give: its attribution* has been moved to the foot of the other side, beside the scale (see map.tsx).*- * Held off the edges by as much as MapLibre holds its own controls off them, so the bar and the scale- * opposite it stand on the same line.+ * Held off the edges by as much as everything else standing over the map is, which is settled for+ * both in index.css, so the bar and the scale opposite it stand on the same line.** Above the canvas whatever order the two end up in: MapLibre builds its part of the container* itself, so what Preact renders alongside is not reliably the later sibling. The number clears* MapLibre's own control corners, which sit at 2.*/.geo-map-container .geo-map-toolbar {- bottom: 10px;- inset-inline-end: 10px;+ bottom: var(--geo-map-inset);+ inset-inline-end: var(--geo-map-inset);z-index: 3;}diff --git a/apps/client/src/widgets/collections/geomap/index.css b/apps/client/src/widgets/collections/geomap/index.cssindex cbe037b87c..6fd35b5d0c 100644--- a/apps/client/src/widgets/collections/geomap/index.css+++ b/apps/client/src/widgets/collections/geomap/index.css@@ -11,12 +11,25 @@}.geo-map-container {+ /* How far everything standing over the map is held off its edges: the toolbar (see+ MapToolbar.css) and MapLibre's own scale and attribution below. Settled here so that the two+ agree, and matching the room the mind map gives its bars (see MindMap.css). */+ --geo-map-inset: 20px;+height: 100%;overflow: hidden;.maplibregl-canvas-container {position: relative;}++ /* MapLibre holds its controls 10px off the edge, which is half of what everything else over the+ map keeps to; only the foot of the map carries any (the scale and the attribution). */+ .maplibregl-ctrl-bottom-left .maplibregl-ctrl,+ .maplibregl-ctrl-bottom-right .maplibregl-ctrl {+ margin-bottom: var(--geo-map-inset);+ margin-inline: var(--geo-map-inset);+ }}.geo-view.placing-note .geo-map-container {