From 5b5a84c1a0421e05f9785f74127b9ea8450f9846 Mon Sep 17 00:00:00 2001 From: bach Date: Thu, 13 Jul 2023 10:31:31 +0200 Subject: [PATCH] better mouse over on map items #2192 --- src/components/ConcernementMapItem.vue | 30 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index 3e6a79a..5ffc11b 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -1049,15 +1049,15 @@ export default { // PAPER EVENTS initPaperEvents(){ - this.paper_main_object.onMouseEnter = function(event){ - if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened and is this focused - this.setHoverElmt({ - type: 'concernement', - id: this.id - }); - document.body.style.cursor = "pointer"; - } - }.bind(this); + // this.paper_main_object.onMouseEnter = function(event){ + // if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened and is this focused + // this.setHoverElmt({ + // type: 'concernement', + // id: this.id + // }); + // document.body.style.cursor = "pointer"; + // } + // }.bind(this); this.paper_main_object.onMouseLeave = function(event){ if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened @@ -1068,8 +1068,16 @@ export default { this.paper_main_object.onMouseMove = function(event){ // console.log(`onmousemove ${this.id}`); - // TODO besoins & actions & doleances - if (this.is_opened) { + if (!this.is_opened) { + if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened and is this focused + this.setHoverElmt({ + type: 'concernement', + id: this.id + }); + document.body.style.cursor = "pointer"; + } + + } else { // lets define some options regarding the map_mode let paper_group_tohit;