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

@@ -37,7 +37,7 @@
{% include "./tool/toolbar-object.html" %}
<div v-if="active_space && active_space_loaded">
<div id="lasso"></div>
<!-- <div id="lasso"></div> -->
<div class="snap-ruler-h" v-bind:style="{top:snap_ruler_y+'px'}"></div>
<div class="snap-ruler-v" v-bind:style="{left:snap_ruler_x+'px'}"></div>
<div class="space-empty" v-cloak v-if="active_view == 'space' && !present_mode && active_space_artifacts.length == 0">
@@ -79,7 +79,7 @@
'background-color': ''+active_space.background_color,
'margin-left': bounds_margin_horiz + 'px',
'margin-top': bounds_margin_vert + 'px'}" >
<div id="lasso"></div>
<div v-for="a in active_space_artifacts"
v-bind:style="a.view.style" v-bind:class="a.view.classes"
v-bind:class="{text-editing:(editing_artifact_id==a._id && (a.view.major_type=='text' || a.view.major_type=='shape'))}"