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): keep the new paint lines inside the line limit
Claude85423afb9bc7
diff --git a/apps/client/src/widgets/collections/geomap/Markers.tsx b/apps/client/src/widgets/collections/geomap/Markers.tsxindex 2068b0ebf3..1207f7b83b 100644--- a/apps/client/src/widgets/collections/geomap/Markers.tsx+++ b/apps/client/src/widgets/collections/geomap/Markers.tsx@@ -351,12 +351,13 @@ export default function Markers({ notes, hideLabels, isDarkTheme, clustered, plaif (!map?.getLayer(MARKER_LAYER)) return;const labelPaint = LABEL_PAINT[isDarkTheme ? "dark" : "light"];+ // The glow keeps the same bargain the titles do, so it changes sides with them.+ const glowPaint = SELECTION_GLOW_PAINT[isDarkTheme ? "dark" : "light"];map.setLayoutProperty(MARKER_LAYER, "text-field", titleField(hideLabels, selectedNoteId));map.setPaintProperty(MARKER_LAYER, "text-color", labelPaint["text-color"]);map.setPaintProperty(MARKER_LAYER, "text-halo-color", labelPaint["text-halo-color"]);- // The glow keeps the same bargain the titles do, so it changes sides with them.- map.setPaintProperty(SELECTION_LAYER, "circle-color", SELECTION_GLOW_PAINT[isDarkTheme ? "dark" : "light"]["circle-color"]);+ map.setPaintProperty(SELECTION_LAYER, "circle-color", glowPaint["circle-color"]);}, [ map, hideLabels, isDarkTheme, selectedNoteId ]);// The selected marker, told apart on the standing layers: its pin grown and raised above itsdiff --git a/apps/client/src/widgets/collections/geomap/Pois.tsx b/apps/client/src/widgets/collections/geomap/Pois.tsxindex bcce12fe68..d9edb45bc1 100644--- a/apps/client/src/widgets/collections/geomap/Pois.tsx+++ b/apps/client/src/widgets/collections/geomap/Pois.tsx@@ -232,7 +232,11 @@ export default function Pois({ placing, onPick }: PoisProps) {const map = parentMap;// What the style painted its places with, to be put back when this is taken off. Either// may be absent, a style being composable in one and not the other.- let painted: { layer: string; color?: AllPaintProperties["icon-color"]; opacity?: AllPaintProperties["icon-opacity"] }[] = [];+ let painted: {+ layer: string;+ color?: AllPaintProperties["icon-color"];+ opacity?: AllPaintProperties["icon-opacity"];+ }[] = [];/** Puts back what the style painted, for a map that keeps its layers after this goes. */function restore() {@@ -436,7 +440,9 @@ function readRamp(value: unknown) {// A base of one climbs evenly, which is what `linear` says; anything else is the curve the old// syntax spells `base`.- const interpolation: InterpolationSpecification = typeof base === "number" && base !== 1 ? [ "exponential", base ] : [ "linear" ];+ const interpolation: InterpolationSpecification = typeof base === "number" && base !== 1+ ? [ "exponential", base ]+ : [ "linear" ];return { stops: read, interpolation };}