invert the gestures on touch devices [Autodesk forge viewer]
I am using forge autodesk v7 in my web application. I want the iPhone experience to be more intuitive, so that I can navigate the Viewer at its best. For this, I would like to invert the gestures on touch devices:
Drag 1 finger = pan
2 finger drag = rotate
I was trying to write my own methods that respond to touchstart and touchmove, modifying setView(position, target) unsuccessfully
document.addEventListener('touchmove', this.touchEvent);
touchEvent(ev): void {
if (ev.touches.length === 1) {
const target = this.viewer.navigation.getTarget();
const position = this.viewer.navigation.getPosition();
position.x += ev.changedTouches[0].clientX;
position.y += ev.changedTouches[0].clientY;
target.x += (ev.changedTouches[0].clientX;
target.y += ev.changedTouches[0].clientY;
this.viewer.navigation.setView(position, target);
} else {
console.log('Two finger');
}
}