mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 16:45:13 +02:00
protect from division by 0 when horizontally scrolling
This commit is contained in:
parent
fc54b92d06
commit
1ec50e2399
@ -231,6 +231,8 @@ export default {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
console.log(event.deltaY);
|
||||
if (!event.deltaY)
|
||||
return;
|
||||
const direction = -event.deltaY / Math.abs(event.deltaY);
|
||||
const scale = Math.pow(1.1, direction);
|
||||
const candidate = settings.directoryView.gridEntrySize * scale;
|
||||
|
Loading…
x
Reference in New Issue
Block a user