control pos interface.

This commit is contained in:
Miroslav Šedivý
2022-07-23 14:17:03 +02:00
parent 56b7c8087d
commit f4b22e82a9
2 changed files with 26 additions and 21 deletions

View File

@ -306,7 +306,7 @@
this.sendMousePos(e)
this.webrtc.send('wheel', { x, y })
} else {
this.wsControl.scroll(x, y)
this.wsControl.scroll({ x, y })
}
}
@ -331,8 +331,8 @@
this.sendMousePos(e)
this.webrtc.send('mousedown', { key })
} else {
const { x, y } = this.getMousePos(e.clientX, e.clientY)
this.wsControl.buttonDown(key, x, y)
const pos = this.getMousePos(e.clientX, e.clientY)
this.wsControl.buttonDown(key, pos)
}
}
@ -347,8 +347,8 @@
this.sendMousePos(e)
this.webrtc.send('mouseup', { key })
} else {
const { x, y } = this.getMousePos(e.clientX, e.clientY)
this.wsControl.buttonUp(key, x, y)
const pos = this.getMousePos(e.clientX, e.clientY)
this.wsControl.buttonUp(key, pos)
}
}