Ver código fonte

bug fix cartouch_is_opened #2296

bach 1 ano atrás
pai
commit
5db02242aa
2 arquivos alterados com 5 adições e 4 exclusões
  1. 4 4
      src/components/ConcernementMapItem.vue
  2. 1 0
      src/stores/common.js

+ 4 - 4
src/components/ConcernementMapItem.vue

@@ -65,7 +65,7 @@ export default {
     ...mapState(CommonStore,['hover_elmt',
                             'map_item_ray',
                             'cartouch_width',
-                            'cartouch_is_open',
+                            'cartouch_is_opened',
                             'paper_symbol_definitions'])
   },
   created () {
@@ -1334,10 +1334,10 @@ export default {
       }.bind(this);
 
       this.paper_main_object.onMouseMove = function(event){
-        // console.log(`onmousemove ${this.id}`);
+        console.log(`onmousemove ${this.id}`, this.cartouch_is_opened);
 
         // prevent hover map item mouse event if cartouch is opened
-        if (this.cartouch_is_open && this.map_mode !== "superposition") return;
+        if (this.cartouch_is_opened && this.map_mode !== "superposition") return;
         
         if (!this.is_open) {
           if (!this.opened_concernement) { // only if no concernement is opened and is this focused
@@ -1433,7 +1433,7 @@ export default {
         console.log('paper concernement onClick');
         
         // prevent hover map item mouse event if cartouch is opened
-        if (this.cartouch_is_open) return;
+        if (this.cartouch_is_opened) return;
         
         if (!this.is_open) { // si ce concernement n'est pas ouvet
           console.log('mapitem is NOT opened');

+ 1 - 0
src/stores/common.js

@@ -26,6 +26,7 @@ export const CommonStore = defineStore({
       this.cartouch_width = this.original_cartouch_width * delta; 
     },
     setCartoucheOpened (v) {
+      console.log('setCartoucheOpened', v);
       this.cartouch_is_opened = v;
     },
     addPaperSymbolDefinition(name, path) {