mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-02 05:00:40 +08:00
feat(touch_bar): use disabled button for geomap
This commit is contained in:
parent
a3c58834d1
commit
ff78ab650a
@ -397,31 +397,23 @@ export default class GeoMapTypeWidget extends TypeWidget {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (this._state) {
|
return [
|
||||||
case State.Normal:
|
new TouchBar.TouchBarSlider({
|
||||||
return [
|
label: "Zoom",
|
||||||
new TouchBar.TouchBarSlider({
|
value: map.getZoom(),
|
||||||
label: "Zoom",
|
minValue: map.getMinZoom(),
|
||||||
value: map.getZoom(),
|
maxValue: map.getMaxZoom(),
|
||||||
minValue: map.getMinZoom(),
|
change(newValue) {
|
||||||
maxValue: map.getMaxZoom(),
|
that.ignoreNextZoomEvent = true;
|
||||||
change(newValue) {
|
map.setZoom(newValue);
|
||||||
that.ignoreNextZoomEvent = true;
|
},
|
||||||
map.setZoom(newValue);
|
}),
|
||||||
},
|
new TouchBar.TouchBarButton({
|
||||||
}),
|
label: "New geo note",
|
||||||
new TouchBar.TouchBarButton({
|
click: () => this.triggerCommand("geoMapCreateChildNote", { ntxId: this.ntxId }),
|
||||||
label: "New geo note",
|
enabled: (this._state === State.Normal)
|
||||||
click: () => this.triggerCommand("geoMapCreateChildNote", { ntxId: this.ntxId })
|
})
|
||||||
})
|
];
|
||||||
];
|
|
||||||
|
|
||||||
case State.NewNote:
|
|
||||||
return [
|
|
||||||
new TouchBar.TouchBarSpacer({ size: "flexible" }),
|
|
||||||
new TouchBar.TouchBarLabel({ label: "New note" })
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user