Merge pull request #231 from meefik/patch-1
Fix incorrect mouse position
This commit is contained in:
+2
-2
@@ -1325,8 +1325,8 @@
|
|||||||
// convert to cols/rows
|
// convert to cols/rows
|
||||||
w = self.element.clientWidth;
|
w = self.element.clientWidth;
|
||||||
h = self.element.clientHeight;
|
h = self.element.clientHeight;
|
||||||
x = Math.round((x / w) * self.cols);
|
x = Math.ceil((x / w) * self.cols);
|
||||||
y = Math.round((y / h) * self.rows);
|
y = Math.ceil((y / h) * self.rows);
|
||||||
|
|
||||||
// be sure to avoid sending
|
// be sure to avoid sending
|
||||||
// bad positions to the program
|
// bad positions to the program
|
||||||
|
|||||||
Reference in New Issue
Block a user