chore(react/collections/geomap): bring back remove from map

This commit is contained in:
Elian Doran 2025-09-04 21:52:41 +03:00
parent 8bb8e011f3
commit 9adf9a841c
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -67,6 +67,10 @@ export default function GeoView({ note, noteIds, viewConfig, saveConfig }: ViewM
window.addEventListener("keydown", globalKeyListener); window.addEventListener("keydown", globalKeyListener);
}); });
useTriliumEvent("deleteFromMap", ({ noteId }) => {
moveMarker(noteId, null);
});
const onClick = useCallback(async (e: LeafletMouseEvent) => { const onClick = useCallback(async (e: LeafletMouseEvent) => {
if (state === State.NewNote) { if (state === State.NewNote) {
toast.closePersistent("geo-new-note"); toast.closePersistent("geo-new-note");

View File

@ -132,10 +132,6 @@ export default class GeoView extends ViewMode<MapData> {
} }
} }
deleteFromMapEvent({ noteId }: EventData<"deleteFromMap">) {
moveMarker(noteId, null);
}
buildTouchBarCommand({ TouchBar }: CommandListenerData<"buildTouchBar">) { buildTouchBarCommand({ TouchBar }: CommandListenerData<"buildTouchBar">) {
const map = this.map; const map = this.map;
const that = this; const that = this;