Преглед на файлове

better mouse over on map items #2192

bach преди 1 година
родител
ревизия
5b5a84c1a0
променени са 1 файла, в които са добавени 19 реда и са изтрити 11 реда
  1. 19 11
      src/components/ConcernementMapItem.vue

+ 19 - 11
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;