mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Fixed rooms not deselecting when clicking outside of them on a previous floor room
This commit is contained in:
parent
c2006a7975
commit
7ac646463f
@ -195,7 +195,6 @@ beestat.component.floor_plan.prototype.add_grid_ = function() {
|
|||||||
grid_large_pattern.appendChild(grid_large_path);
|
grid_large_pattern.appendChild(grid_large_path);
|
||||||
|
|
||||||
const grid_rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
const grid_rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
||||||
grid_rect.setAttribute('id', 'grid_rect');
|
|
||||||
grid_rect.setAttribute('x', this.grid_pixels_ / -2);
|
grid_rect.setAttribute('x', this.grid_pixels_ / -2);
|
||||||
grid_rect.setAttribute('y', this.grid_pixels_ / -2);
|
grid_rect.setAttribute('y', this.grid_pixels_ / -2);
|
||||||
grid_rect.setAttribute('width', this.grid_pixels_);
|
grid_rect.setAttribute('width', this.grid_pixels_);
|
||||||
@ -264,7 +263,7 @@ beestat.component.floor_plan.prototype.set_draggable_ = function() {
|
|||||||
this.mouseup_handler_ = function(e) {
|
this.mouseup_handler_ = function(e) {
|
||||||
// Deselect when clicking on the background.
|
// Deselect when clicking on the background.
|
||||||
if (
|
if (
|
||||||
e.target.getAttribute('id') === 'grid_rect' &&
|
self.parent_.contains(e.target) &&
|
||||||
e.clientX === self.drag_start_mouse_.x &&
|
e.clientX === self.drag_start_mouse_.x &&
|
||||||
e.clientY === self.drag_start_mouse_.y
|
e.clientY === self.drag_start_mouse_.y
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user