|
|
|
@ -16,7 +16,7 @@ class ZoomComponent extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener("wheel", event => {
|
|
|
|
window.addEventListener("wheel", event => {
|
|
|
|
if (event.ctrlKey) {
|
|
|
|
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() {
|
|
|
|
zoomResetEvent() {
|
|
|
|
this.setZoomFactorAndSave(1);
|
|
|
|
this.setZoomFactorAndSave(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setZoomFactorAndSaveEvent({zoomFactor}) {
|
|
|
|
setZoomFactorAndSaveEvent({zoomFactor}) {
|
|
|
|
this.setZoomFactorAndSave(zoomFactor);
|
|
|
|
this.setZoomFactorAndSave(zoomFactor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|