Open FrankiePo opened 3 years ago
Did you find a way?
I got this working in a two-step solution.
1 - Default configuration
viewport.drag({
ignoreKeyToPressOnTouch: true,
})
.wheel({
percent: 2,
trackpadPinch: true,
wheelZoom: false,
})
.decelerate()
.pinch()
.clampZoom({
minScale: 0.05,
maxScale: 3.0
});
2 - Setting separate keypress handler
window.onkeydown = (e) => {
if (e.key === 'Meta') {
viewport.wheel({
percent: 2,
trackpadPinch: true,
wheelZoom: true,
})
}
}
window.onkeyup = (e) => {
if (e.key === 'Meta') {
viewport.wheel({
percent: 2,
trackpadPinch: true,
wheelZoom: false,
})
}
}
How can we achieve simultaneously pan and zoom via touchpad using API?
Currently I have this settings