better mouse over on map items #2192

This commit is contained in:
Bachir Soussi Chiadmi 2023-07-13 10:31:31 +02:00
parent e9e4627cf2
commit 5b5a84c1a0

View File

@ -1049,15 +1049,15 @@ export default {
// PAPER EVENTS // PAPER EVENTS
initPaperEvents(){ initPaperEvents(){
this.paper_main_object.onMouseEnter = function(event){ // this.paper_main_object.onMouseEnter = function(event){
if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened and is this focused // if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened and is this focused
this.setHoverElmt({ // this.setHoverElmt({
type: 'concernement', // type: 'concernement',
id: this.id // id: this.id
}); // });
document.body.style.cursor = "pointer"; // document.body.style.cursor = "pointer";
} // }
}.bind(this); // }.bind(this);
this.paper_main_object.onMouseLeave = function(event){ this.paper_main_object.onMouseLeave = function(event){
if (!this.opened_concernement && this.isFocused()) { // only if no concernement is opened 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){ this.paper_main_object.onMouseMove = function(event){
// console.log(`onmousemove ${this.id}`); // 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 // lets define some options regarding the map_mode
let paper_group_tohit; let paper_group_tohit;