fix for jump on mousemove
This commit is contained in:
parent
4929d12d33
commit
2bc0f68779
1 changed files with 2 additions and 2 deletions
|
|
@ -287,8 +287,8 @@ const create_defs = function () {
|
||||||
*/
|
*/
|
||||||
const move_vector = function (event) {
|
const move_vector = function (event) {
|
||||||
if (moving_vector) {
|
if (moving_vector) {
|
||||||
let current_x = event.clientX;
|
let current_x = event.offsetX;
|
||||||
let current_y = event.clientY;
|
let current_y = event.offsetY;
|
||||||
let vector = vectors_by_id[parseInt(moving_vector.id)];
|
let vector = vectors_by_id[parseInt(moving_vector.id)];
|
||||||
if (vector) {
|
if (vector) {
|
||||||
vector.x = (current_x - origin_x) / grid_size;
|
vector.x = (current_x - origin_x) / grid_size;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue