mirror of
https://github.com/beestat/app.git
synced 2025-05-24 02:14:03 -04:00
Debug/fix for #387
This commit is contained in:
parent
263a54960d
commit
b9b39495a5
@ -202,6 +202,12 @@ beestat.component.floor_plan_entity.point.prototype.after_mousedown_handler_ = f
|
||||
beestat.component.floor_plan_entity.point.prototype.after_mousemove_handler_ = function(e) {
|
||||
const snap_distance = 6;
|
||||
|
||||
// Debug/fix for #387
|
||||
if (this.drag_start_entity_ === undefined) {
|
||||
console.error('this.drag_start_entity_ is undefined (point)');
|
||||
return;
|
||||
}
|
||||
|
||||
let desired_x = this.drag_start_entity_.x + (((e.clientX || e.touches[0].clientX) - this.drag_start_mouse_.x) * this.floor_plan_.get_scale());
|
||||
let desired_y = this.drag_start_entity_.y + (((e.clientY || e.touches[0].clientY) - this.drag_start_mouse_.y) * this.floor_plan_.get_scale());
|
||||
|
||||
|
@ -462,6 +462,12 @@ beestat.component.floor_plan_entity.room.prototype.after_mousedown_handler_ = fu
|
||||
beestat.component.floor_plan_entity.room.prototype.after_mousemove_handler_ = function(e) {
|
||||
const self = this;
|
||||
|
||||
// Debug/fix for #387
|
||||
if (this.drag_start_entity_ === undefined) {
|
||||
console.error('this.drag_start_entity_ is undefined (room)');
|
||||
return;
|
||||
}
|
||||
|
||||
let desired_x = this.drag_start_entity_.x + (((e.clientX || e.touches[0].clientX) - this.drag_start_mouse_.x) * this.floor_plan_.get_scale());
|
||||
let desired_y = this.drag_start_entity_.y + (((e.clientY || e.touches[0].clientY) - this.drag_start_mouse_.y) * this.floor_plan_.get_scale());
|
||||
|
||||
|
@ -358,6 +358,12 @@ beestat.component.floor_plan_entity.wall.prototype.set_xy = function(x, y, event
|
||||
beestat.component.floor_plan_entity.wall.prototype.after_mousemove_handler_ = function(e) {
|
||||
const snap_distance = 6;
|
||||
|
||||
// Debug/fix for #387
|
||||
if (this.drag_start_entity_ === undefined) {
|
||||
console.error('this.drag_start_entity_ is undefined (wall)');
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.is_vertical_() === true) {
|
||||
let desired_x = this.drag_start_entity_.x + (((e.clientX || e.touches[0].clientX) - this.drag_start_mouse_.x) * this.floor_plan_.get_scale());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user