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
feat(touch_bar): zoom slider
Elian Doran36eac98b4d5b
diff --git a/src/public/app/widgets/geo_map.ts b/src/public/app/widgets/geo_map.tsindex fabefcdc9f..eef72a7483 100644--- a/src/public/app/widgets/geo_map.ts+++ b/src/public/app/widgets/geo_map.ts@@ -1,6 +1,7 @@import type { Map } from "leaflet";import library_loader from "../services/library_loader.js";import NoteContextAwareWidget from "./note_context_aware_widget.js";+import type { CommandListenerData } from "../components/app_context.js";const TPL = `\<div class="geo-map-widget">@@ -59,4 +60,22 @@ export default class GeoMapWidget extends NoteContextAwareWidget {});}+ buildTouchBarCommand({ TouchBar }: CommandListenerData<"buildTouchBar">) {+ const map = this.map;+ if (!map) {+ return;+ }++ return [+ new TouchBar.TouchBarSlider({+ label: "Zoom",+ minValue: map.getMinZoom(),+ maxValue: map.getMaxZoom(),+ change(newValue) {+ map.setZoom(newValue);+ },+ })+ ];+ }+}