web: fixed mouse

This commit is contained in:
Devaev Maxim 2019-09-30 00:42:44 +03:00
parent 8f43d23089
commit a60e4142b8

View File

@ -139,8 +139,8 @@ export function Mouse() {
var __streamMoveHandler = function(event) {
let rect = event.target.getBoundingClientRect();
__current_pos = {
x: Math.min(Math.round(event.clientX - rect.left), 0),
y: Math.min(Math.round(event.clientY - rect.top), 0),
x: Math.max(Math.round(event.clientX - rect.left), 0),
y: Math.max(Math.round(event.clientY - rect.top), 0),
};
};