Skip to content

Commit

Permalink
Set zoom delta min value
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalD96 committed Oct 6, 2024
1 parent dac9803 commit 0a7564e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions assets/js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Menu {
});
createInputContainer({
key: 'map_zoom_delta',
min: 0, max: 2, value: Settings.zoomDelta, defaultValue: 0.5,
min: 0.1, max: 2, value: Settings.zoomDelta, defaultValue: 0.5,
step: 0.1, isFloat: true,
});
createInputContainer({
Expand All @@ -169,8 +169,7 @@ class Menu {

const reset = document.getElementById('reset-map-zoom');
reset.addEventListener('click', () => {
const zoomSettings = ['map_zoom_snap', 'map_zoom_delta', 'map_wheel_debounce_time', 'map_wheel_px_per_zoom_level'
].map((key) =>
const zoomSettings = ['map_zoom_snap', 'map_zoom_delta', 'map_wheel_debounce_time', 'map_wheel_px_per_zoom_level'].map((key) =>
key
.replace(/^map_/, '')
.split('_')
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ <h2 class="header-title" data-text="menu.customization_title">Customization</h2>
</div>
<div class="input-container" data-help="map_zoom_delta">
<label for="map-zoom-delta" data-text="menu.map_zoom_delta">Map zoom delta</label>
<input id="map-zoom-delta" class="input-text narrow-select-menu" type="number" min="0" max="2" value="1"/>
<input id="map-zoom-delta" class="input-text narrow-select-menu" type="number" min="0.1" max="2" value="1"/>
</div>
<div class="input-container" data-help="map_wheel_debounce_time">
<label for="map-wheel-debounce-time" data-text="menu.map_wheel_debounce_time">Map wheel debounce time</label>
Expand Down

0 comments on commit 0a7564e

Please sign in to comment.