Ungetestet:
JavaScript
toolbaritem.addEventListener('click', event => {
if (event.button === 0) {
FullZoom.enlarge();
} else if (event.button === 1) {
FullZoom.reset();
} else if (event.button === 2) {
FullZoom.reduce();
}
});
toolbaritem.addEventListener('wheel', event => {
event.preventDefault();
if (event.deltaY < 0) {
FullZoom.enlarge();
} else {
FullZoom.reduce();
}
});
Alles anzeigen