feat: add scroll zoom speed setting

This commit is contained in:
ccmdi 2026-05-12 13:54:10 -04:00
parent 48f7cc7575
commit 4b9edfd4f1
No known key found for this signature in database
2 changed files with 16 additions and 2 deletions

View file

@ -646,7 +646,7 @@ export function createMapRenderer(config: MapRendererOptions): Deck<MapViewType[
initialViewState: { MapView: initialViewState },
controller: {
inertia: true,
scrollZoom: { speed: 0.02, smooth: true },
scrollZoom: { speed: settings.scrollZoomSpeed, smooth: true },
touchRotate: false,
keyboard: false,
dragRotate: false,

View file

@ -14,6 +14,7 @@ export interface MapPluginSettings {
tagSettings: MapTagSettings;
enableTimelineView: boolean;
enableSearchGeocoding: boolean;
scrollZoomSpeed: number;
}
export const DEFAULT_SETTINGS: MapPluginSettings = {
@ -27,7 +28,8 @@ export const DEFAULT_SETTINGS: MapPluginSettings = {
thumbnailTargetSize: 25,
tagSettings: DEFAULT_MAP_TAG_SETTINGS,
enableTimelineView: false,
enableSearchGeocoding: false
enableSearchGeocoding: false,
scrollZoomSpeed: 0.04
};
export class MapSettingTab extends PluginSettingTab {
@ -89,6 +91,18 @@ export class MapSettingTab extends PluginSettingTab {
}, 250);
}));
new Setting(containerEl)
.setName('Scroll zoom speed')
.addSlider(slider => slider
.setLimits(0.01, 0.1, 0.01)
.setValue(this.plugin.settings.scrollZoomSpeed)
.setDynamicTooltip()
.onChange(async (value) => {
this.plugin.settings.scrollZoomSpeed = value;
await this.plugin.saveSettings();
this.plugin.refreshAllMapViews();
}));
new Setting(containerEl)
.setName('Fill icons')
.addToggle(toggle => toggle