Fix to issue #71 Cursor positions on shared whiteboards are inconsistent (#86)

* Fixed "Cursor Positions on Shared Whiteboards are Inconsistent".

The main fix is in the method cursor_point_to_space in
public/javascripts/spacedeck_whiteboard.js.

The calculation of the coordinates of the mouse pointer from absolute
window to the whiteboard space coordinates was incorrect.

There were a number of dependencies on this method which were updated
as a result.

One side-effect was that the div for the lasso tool needed to be
moved inside the div for the whiteboard.

* Fixed minor panning calculation problem.  Works now!
This commit is contained in:
Mishkin Berteig
2020-09-09 10:11:43 -04:00
committed by GitHub
parent 7f72992d06
commit dccf0465b3
3 changed files with 15 additions and 42 deletions

View File

@@ -797,7 +797,6 @@ var SpacedeckSections = {
},
handle_user_cursor_update: function(msg) {
// console.log("handle cursor", msg);
var now = new Date().getTime();
msg.t = now;
var existing = false;
@@ -809,7 +808,6 @@ var SpacedeckSections = {
u.y = msg.y;
u.t = now;
u.name = msg.name;
// console.log("updated cursor "+i);
existing = true;
} else {
// hide if no updates since 2sec