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): use disabled button for geomap
Elian Doranff78ab650af8
diff --git a/src/public/app/widgets/type_widgets/geo_map.ts b/src/public/app/widgets/type_widgets/geo_map.tsindex 5ada5c7f53..6b478f1306 100644--- a/src/public/app/widgets/type_widgets/geo_map.ts+++ b/src/public/app/widgets/type_widgets/geo_map.ts@@ -397,31 +397,23 @@ export default class GeoMapTypeWidget extends TypeWidget {return;}- switch (this._state) {- case State.Normal:- return [- new TouchBar.TouchBarSlider({- label: "Zoom",- value: map.getZoom(),- minValue: map.getMinZoom(),- maxValue: map.getMaxZoom(),- change(newValue) {- that.ignoreNextZoomEvent = true;- map.setZoom(newValue);- },- }),- new TouchBar.TouchBarButton({- label: "New geo note",- click: () => this.triggerCommand("geoMapCreateChildNote", { ntxId: this.ntxId })- })- ];-- case State.NewNote:- return [- new TouchBar.TouchBarSpacer({ size: "flexible" }),- new TouchBar.TouchBarLabel({ label: "New note" })- ]- }+ return [+ new TouchBar.TouchBarSlider({+ label: "Zoom",+ value: map.getZoom(),+ minValue: map.getMinZoom(),+ maxValue: map.getMaxZoom(),+ change(newValue) {+ that.ignoreNextZoomEvent = true;+ map.setZoom(newValue);+ },+ }),+ new TouchBar.TouchBarButton({+ label: "New geo note",+ click: () => this.triggerCommand("geoMapCreateChildNote", { ntxId: this.ntxId }),+ enabled: (this._state === State.Normal)+ })+ ];}}