handle 0 wheel deltaX

This commit is contained in:
Andray 2024-03-15 12:07:11 +04:00
parent 3e0146f9bd
commit c364b60776

View File

@ -793,7 +793,7 @@ onUiLoaded(async() => {
targetElement.addEventListener("wheel", e => {
// change zoom level
const operation = e.deltaY > 0 ? "-" : "+";
const operation = (e.deltaY || -e.wheelDelta) > 0 ? "-" : "+";
changeZoomLevel(operation, e);
// Handle brush size adjustment with ctrl key pressed