mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
chore(react/collections/geomap): fix color class
This commit is contained in:
@@ -53,9 +53,13 @@ export default function GeoView({ note, noteIds, viewConfig, saveConfig }: ViewM
|
|||||||
|
|
||||||
function NoteMarker({ note }: { note: FNote }) {
|
function NoteMarker({ note }: { note: FNote }) {
|
||||||
const [ location ] = useNoteLabel(note, LOCATION_ATTRIBUTE);
|
const [ location ] = useNoteLabel(note, LOCATION_ATTRIBUTE);
|
||||||
const [ colorClass ] = useNoteLabel(note, "colorClass");
|
|
||||||
useNoteLabel(note, "iconClass"); // React to icon changes.
|
// React to changes
|
||||||
|
useNoteLabel(note, "color");
|
||||||
|
useNoteLabel(note, "iconClass");
|
||||||
|
|
||||||
const title = useNoteProperty(note, "title");
|
const title = useNoteProperty(note, "title");
|
||||||
|
const colorClass = note.getColorClass();
|
||||||
const iconClass = note.getIcon();
|
const iconClass = note.getIcon();
|
||||||
const latLng = location?.split(",", 2).map((el) => parseFloat(el)) as [ number, number ] | undefined;
|
const latLng = location?.split(",", 2).map((el) => parseFloat(el)) as [ number, number ] | undefined;
|
||||||
const icon = useMemo(() => buildIcon(iconClass, colorClass ?? undefined, title, note.noteId), [ iconClass, colorClass, title, note.noteId]);
|
const icon = useMemo(() => buildIcon(iconClass, colorClass ?? undefined, title, note.noteId), [ iconClass, colorClass, title, note.noteId]);
|
||||||
|
|||||||
Reference in New Issue
Block a user