fix: mouse scroll wheel direction

This commit is contained in:
Romain DEP. 2024-11-03 23:01:01 +01:00
parent a02146df17
commit 21cfb64f83

View File

@ -16,7 +16,7 @@ class ZoomComponent extends Component {
window.addEventListener("wheel", event => {
if (event.ctrlKey) {
this.setZoomFactorAndSave(this.getCurrentZoom() + event.deltaY * 0.001);
this.setZoomFactorAndSave(this.getCurrentZoom() - event.deltaY * 0.001);
}
});
}
@ -56,7 +56,7 @@ class ZoomComponent extends Component {
zoomResetEvent() {
this.setZoomFactorAndSave(1);
}
setZoomFactorAndSaveEvent({zoomFactor}) {
this.setZoomFactorAndSave(zoomFactor);
}