gemercheung 2 年之前
父节点
当前提交
c9834ce94d

文件差异内容过多而无法显示
+ 5 - 5
packages/qjkankan-editor/public/static/lib/krpano/js/tour.js


+ 158 - 98
packages/qjkankan-editor/public/static/template/customTooltip.xml

@@ -6,53 +6,52 @@
         set(hsp_type,%2); 
         txtadd(iconUrl,'',%4);
         txtreplace(iconUrl,'|',',');
-
+                        <!-- trace('originName::',%1); -->
         if(%2 LE 1,
-                     <!-- trace('id==',get(hsp_name),"::",get(iconUrl)); -->
+                                             <!-- trace('id==',get(hsp_name),"::",get(iconUrl)); -->
              set(hotspot[get(hsp_name)].type,'image');
              set(hotspot[get(hsp_name)].url,get(iconUrl));
          );
         ifnot(%2 LE 1, set(hotspot[get(hsp_name)].type, 'text'));
 
-                <!-- 其他标签 (0,1,2)-->
-        if(%2 LE 2,
-         set(hotspot[get(hsp_name)].height,%8);
-         set(hotspot[get(hsp_name)].width,'prop');
-         txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();");
-         );
-
-  
+                                        <!-- 其他标签 (0,1,2)-->
+    
         set(hotspot[get(hsp_name)].name,%1);
         set(hotspot[get(hsp_name)].hotspottype,%2);
         set(hotspot[get(hsp_name)].hotspottitle,%3);
         set(hotspot[get(hsp_name)].hotspotStyle,%10);
-
+        set(hotspot[get(hsp_name)].hotlink,%7);
         set(hotspot[get(hsp_name)].ath,%5);
         set(hotspot[get(hsp_name)].atv,%6);
-
         set(hotspot[get(hsp_name)].visible,true);
         set(hotspot[get(hsp_name)].alpha,1);
         set(hotspot[get(hsp_name)].scale,1);
         set(hotspot[get(hsp_name)].autoalpha,false);
         set(hotspot[get(hsp_name)].distorted,false);
+        set(hotspot[get(hsp_name)].border,false);
         set(hotspot[get(hsp_name)].onclick,'js(__krfn.utils.linkopen(%7,%1));');
         set(hotspot[get(hsp_name)].ondown,dragJQhotspot(););
         set(hotspot[get(hsp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv))));
 
-         txtsplit(%10,'|',fontSize,pos,isHover,borderColor,fillColor,textColor,isShowLine,isTextWrap,lineDirection,textDirection,textNumPerLine,duration,frameNumber);
-     
-   
-                <!-- 个性化标签(3) -->
+        txtsplit(%10,'|',fontSize,pos,isHover,borderColor,fillColor,textColor,isShowLine,isTextWrap,lineDirection,textDirection,textNumPerLine,duration,frameNumber);
+        txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();");
+
+       if(%2 LE 2,
+         set(hotspot[get(hsp_name)].height,%8);
+         set(hotspot[get(hsp_name)].width,'prop');
+         <!-- txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label(get(%1));"); -->
+         );
+                                        <!-- 个性化标签(3) -->
         if(%2 == 3,    
             set(hotspot[get(hsp_name)].height,80);
             set(hotspot[get(hsp_name)].width,1);
             set(hotspot[get(hsp_name)].padding,0);
             set(hotspot[get(hsp_name)].background,false);
-            txtadd(line,'        <div style="background-color: ',get(borderColor),';width:1px;height:80px;"></div>');
-            trace('tags::',tagStyle);
+            txtadd(line,'<div style="background-color: ',get(borderColor),';width:1px;height:80px;"></div>');
             copy(hotspot[get(hsp_name)].html,line);
-            txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();");
-            if(
+            <!-- txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();"); -->
+            set_label_dir(get(hsp_name),get(lineDirection),0);
+            <!-- if(
                 lineDirection == 'right-top',
                 set(hotspot[get(hsp_name)].rotate,35);
             );
@@ -75,7 +74,7 @@
             if(
                 lineDirection == 'left-bottom',
                 set(hotspot[get(hsp_name)].rotate,35);
-            );
+            ); -->
         );
 
         addhotspot(get(hsp_name));
@@ -85,7 +84,7 @@
     <action name="add_tooltip_label">
         txtadd(tooltipname, 'tooltip_', get(name)); 
         txtsplit(hotspotStyle,'|',fontSize,pos,isHover,borderColor,fillColor,textColor,isShowLine,isTextWrap,lineDirection,textDirection,textNumPerLine,duration,frameNumber);
-
+        txtadd(pName, get(name)); 
         addlayer(get(tooltipname));
         txtadd(layer[get(tooltipname)].parent, 'hotspot[', get(name), ']');
         set(layer[get(tooltipname)].autowidth, true);
@@ -99,24 +98,27 @@
         set(layer[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
         set(layer[get(tooltipname)].border,false);
         set(layer[get(tooltipname)].align,center);
-  
+        copy(layer[get(tooltipname)].hotlink, hotspot[get(name)].hotlink);
         set(layer[get(tooltipname)].ondown,'dragJQlayer();');
+        
+        set(layer[get(tooltipname)].onclick,JQlayerClick);
         set(layer[get(tooltipname)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(hsName),get(ath),get(atv))));
-                <!-- set(hotspot[get(hsp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv)))); -->
+                                        <!-- set(hotspot[get(hsp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv)))); -->
         txtadd(labelCode, '<div style="display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid ',get(borderColor),'; padding: 6px 10px; white-space: pre; border-radius: 5px; background: ',get(fillColor),'">','            <div style="text-align: left; font-size:',get(fontSize),'px; color: ',get(textColor),'; line-height: 1.4;">',get(hotspottitle),'</div>
         </div>'); 
         
-        <!-- label方位 -->
+                                <!-- label方位 -->
         if(get(hotspottype) LE 2,
-        trace('hotspottype::',get(hotspottype),'::tooltipname::',get(tooltipname),'pos::',get(pos));
+                                <!-- trace('hotspottype::',get(hotspottype),'::tooltipname::',get(tooltipname),'pos::',get(pos)); -->
         set_label_pos(get(tooltipname),get(pos));
        );
 
-                <!-- 个性化标签(3) -->
+                                        <!-- 个性化标签(3) -->
         if(get(hotspottype) == 3,    
-            trace('lineDirection2::',lineDirection); 
-                    <!-- txtadd(labelCode, '<div style="display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid ',get(borderColor),'; padding: 6px 10px; white-space: pre; border-radius: 5px; background: ',get(fillColor),'">','<div style="text-align: left; font-size:',get(fontSize),'px; color: ',get(textColor),'; line-height: 1.4;">',get(hotspottitle),'</div></div>');  -->
-            if(
+            <!-- trace('lineDirection2::',lineDirection);  -->
+            set_label_dir(get(tooltipname),get(lineDirection),1);
+          
+                            <!-- if(
                 lineDirection == 'right-top',
                 set(layer[get(tooltipname)].y,-60);
                 set(layer[get(tooltipname)].rotate,-35);
@@ -156,7 +158,7 @@
                 set(layer[get(tooltipname)].x,0);
                 set(layer[get(tooltipname)].y,60);
                 set(layer[get(tooltipname)].rotate,-35);
-             );
+             ); -->
 
         );
         copy(layer[get(tooltipname)].html, labelCode);
@@ -165,7 +167,7 @@
     <!-- <style name="tooltip_dot_bg" type="container" border-radius="50%" bgcolor="0xFFFFFF" bgalpha="0.9" height="20" width="20" keep="true" /> -->
     <action name='add_tooltip_dot'>
         txtadd(tooldot, 'tooldot_', get(name)); 
-        trace('hey::',get(borderColor));
+        <!-- trace('hey::',get(borderColor)); -->
         addlayer(get(tooldot));
         txtadd(layer[get(tooldot)].parent, 'hotspot[', get(name), ']');
         set(layer[get(tooldot)].width,10); 
@@ -176,58 +178,77 @@
         set(layer[get(tooldot)].type,'text');
         set(layer[get(tooldot)].background,false);
         txtadd(dborderColor,'rgba(255,255,255,0.5)');
-        txtadd(line,'<div style="background-color: ',get(borderColor),';width:10px;height:10px;"></div>');
-        copy(layer[get(tooldot)].html,line);
+        txtadd(dot,'<div style="background-color: ',get(borderColor),';width:10px;height:10px;"></div>');
+        copy(layer[get(tooldot)].html,dot);
         set(layer[get(tooldot)].backgroundcolor,get(borderColor)); 
         set(layer[get(tooldot)].backgroundalpha,0.9); 
         set(layer[get(tooldot)].bgroundedge,5);
-
+        set(layer[get(tooldot)].onclick,JQlayerClick);
         set(layer[get(tooldot)].ondown,'dragJQlayer();');
+        set(layer[get(tooldot)].visible,false);
         set(layer[get(tooldot)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(hsName),get(ath),get(atv))));
 
-                <!-- 个性化标签(3) -->
+                        <!-- 个性化标签(3) -->
         if(get(hotspottype) == 3,    
-            trace('lineDirection3::',lineDirection); 
-            if(
-                lineDirection == 'right-top',
-                set(layer[get(tooldot)].x,0);
-                set(layer[get(tooldot)].y,40);
-             );
-            if(
-                lineDirection == 'right-center',
-                set(layer[get(tooldot)].x,0);
-                set(layer[get(tooldot)].y,40);
-            );
-             if(
-                lineDirection == 'right-bottom',
-                set(layer[get(tooldot)].x,0);
-                set(layer[get(tooldot)].y,-40);
-            );
-             if(
-                lineDirection == 'center-top',
-                 set(layer[get(tooldot)].x,0);
-                 set(layer[get(tooldot)].y,40);
-             );
-             if(
-                lineDirection == 'center-bottom',
-                 set(layer[get(tooldot)].x,0);
-                 set(layer[get(tooldot)].y,-40);
-             );
-             if(
-                lineDirection == 'left-top',
-                 set(layer[get(tooldot)].x,0);
-                 set(layer[get(tooldot)].y,40);
-             );
-             if(
-                lineDirection == 'left-center',
-                 set(layer[get(tooldot)].x,0);
-                 set(layer[get(tooldot)].y,-40);
-             );
-             if(
-                lineDirection == 'left-bottom',
-                 set(layer[get(tooldot)].x,0);
-                 set(layer[get(tooldot)].y,-40);
-             );
+            <!-- trace('lineDirection3::',lineDirection);  -->
+                            <!-- call(set_label_dir); -->
+            set(layer[get(tooldot)].visible,true);
+            set_label_dir(get(tooldot),get(lineDirection),2);            
+        );
+
+    </action>
+    <action name='set_label_dir'>
+     txtadd(dirItem,'',%1);
+     txtadd(lineDirection,'',%2);
+     txtadd(dir,'',%3);
+     trace('set_label_dir::1::',get(dirItem),'::2::',get(lineDirection),'::3::',get(dir));
+
+        if(
+             get(lineDirection) == 'right-top',
+            if(get(dir)==0,set(hotspot[get(dirItem)].rotate,35));
+            if(get(dir)==1,set(layer[get(dirItem)].rotate,-35);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-60));
+            if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,40););
+        );
+        if(
+             get(lineDirection) == 'right-center',
+             if(get(dir)==0,set(hotspot[get(dirItem)].rotate,90));
+             if(get(dir)==1,set(layer[get(dirItem)].rotate,-90);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-80));
+             if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,40););
+        );
+        if(
+             get(lineDirection) == 'right-bottom',
+            if(get(dir)==0,set(hotspot[get(dirItem)].rotate,-35));
+            if(get(dir)==1,set(layer[get(dirItem)].rotate,35);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,60));
+            if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-40););
+        );
+        if(
+             get(lineDirection) == 'center-top',
+            if(get(dir)==0,set(hotspot[get(dirItem)].rotate,0));
+            if(get(dir)==1,set(layer[get(dirItem)].rotate,0);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-55));
+            if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,40););
+        );
+        if(get(lineDirection) == 'center-bottom',
+            if(get(dir)==0,set(hotspot[get(dirItem)].rotate,0));
+            if(get(dir)==1,set(layer[get(dirItem)].rotate,0);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,55));
+            if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-40););
+        );
+        if( get(lineDirection) == 'left-top',
+            if(get(dir)==0,set(hotspot[get(dirItem)].rotate,-35));
+   ;        if(get(dir)==1,set(layer[get(dirItem)].rotate,35);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-60));
+            if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,40););
+        );
+        if(
+             get(lineDirection) == 'left-center',
+             if(get(dir)==0,set(hotspot[get(dirItem)].rotate,90));
+             if(get(dir)==1,set(layer[get(dirItem)].rotate,-90);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,80));
+             if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-40););
+        );
+        if(
+            get(lineDirection) == 'left-bottom',
+            if(get(dir)==0,set(hotspot[get(dirItem)].rotate,35));
+            if(get(dir)==1,set(layer[get(dirItem)].rotate,-35);set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,60));
+            if(get(dir)==2,set(layer[get(dirItem)].x,0);set(layer[get(dirItem)].y,-40););
+
         );
 
     </action>
@@ -238,15 +259,14 @@
        set(pos,%2);    
         if(
             pos == 'top',
-            trace('height::',get(layer[get(posName)].height));
             add(dHeight,get(layer[get(posName)].height), 12);
+            trace('dHeight::',dHeight);
             mul(dHeight, -1);
             set(layer[get(posName)].x,0);
             set(layer[get(posName)].y,get(dHeight));
         );
          if(
             pos == 'bottom',
-            trace('height',get(layer[get(posName)].height));
             add(dHeight,get(layer[get(posName)].height), 12);
             mul(dHeight, 1);
             set(layer[get(posName)].x,0);
@@ -264,7 +284,6 @@
 
     <action name="delaySetLabelHoraLeft">     
         ifnot(isvalue(name),
-            trace('notName1',);
             set(name,%1);
             txtreplace(name, 'tooltip_', ''); 
         );
@@ -272,15 +291,13 @@
         txtadd(tooltipname, 'tooltip_', get(name)); 
         txtadd(jsCode,"document.getElementById('krpanoSWFObject').get('layer[",get(tooltipname),"]').pixelwidth");
         jsget(dWidth,get(jsCode));
-        trace('tooltipname::',get(tooltipname),'dWidth::',dWidth);
         mul(dWidth, -1);
         set(layer[get(tooltipname)].y,0);
         set(layer[get(tooltipname)].x,get(dWidth)); 
     </action>
-    <action name="delaySetLabelHoraRight"> 
+    <action name="delaySetLabelHoraRight">
         <!-- 解决单传时 -->
         ifnot(isvalue(name),
-            trace('notName1',);
             set(name,%1);
             txtreplace(name, 'tooltip_', ''); 
         );
@@ -288,7 +305,7 @@
         txtadd(tooltipname, 'tooltip_', get(name)); 
         txtadd(jsCode,"document.getElementById('krpanoSWFObject').get('layer[",get(tooltipname),"]').pixelwidth");
         jsget(dWidth,get(jsCode));
-        trace('tooltipname::',get(tooltipname),'dWidth::',dWidth);
+
         mul(dWidth, 1);
         set(layer[get(tooltipname)].y,0);
         set(layer[get(tooltipname)].x,get(dWidth)); 
@@ -305,25 +322,62 @@
     <!-- 编辑热点 -->
     <action name="editJQHotspot">
       showlog();
-      trace('editJQHotspot',%2);
       set(hsp_name,%1); 
       set(hsp_type,%2); 
       txtadd(hsLabel, 'tooltip_', %1); 
-      txtadd(hsDot, 'tooldot_', %2); 
+      txtadd(hsDot, 'tooldot_', %1); 
       set(hotspot[get(hsp_name)].hotspottitle,%3);
       set(hotspot[get(hsp_name)].hotspotStyle,%10);
+      copy(hotspot[get(hsp_name)].borderWidth,false);
+      copy(layer[get(hsLabel)].borderWidth,false);
+      copy(layer[get(hsDot)].borderWidth,false);
+      set(hotspot[get(hsp_name)].background,false);
       txtsplit(%10,'|',fontSize,pos,isHover,borderColor,fillColor,textColor,isShowLine,isTextWrap,lineDirection,textDirection,textNumPerLine,duration,frameNumber);
-      txtadd(labelCode, '<div style="display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid ',get(borderColor) ,'; padding: 6px 10px; white-space: pre; border-radius: 5px; background: ',get(fillColor),'">','        <div style="text-align: left; font-size:',get(fontSize),'px; color: ',get(textColor),'; line-height: 1.4;">',%3,'</div></div>');     
+      txtadd(labelCode, '<div style="display: flex; align-items: center; justify-content: center; position: relative; border: 1px solid ',get(borderColor) ,'; padding: 6px 10px; white-space: pre; border-radius: 5px; background: ',get(fillColor),'">','        <div style="text-align: left; font-size:',get(fontSize),'px; color: ',get(textColor),'; line-height: 1.4;">',%3,'</div>
+    </div>');     
       copy(layer[get(hsLabel)].html, labelCode);
+      trace('editJQHotspot',%1,'::type::',%3);
+      
+        if(%3 == '', set(layer[get(hsLabel)].height,12););
+        ifnot(%3 == '', set(layer[get(hsLabel)].height,30););
+
+      if(get(hsp_type) == 3,
+        trace('edit3::',get(borderColor));
+        set(hotspot[get(hsp_name)].rotate,0);
+        set(layer[get(hsLabel)].rotate,0);
+        set(hotspot[get(hsp_name)].type,'text');
+        set(hotspot[get(hsp_name)].width,1);
+        set(hotspot[get(hsp_name)].height,80);
+        set(hotspot[get(hsp_name)].padding,0);
+        set(layer[get(hsDot)].visible,true);
+
+        txtadd(line,'<div style="background-color: ',get(borderColor),';width:1px;height:80px;"></div>');
+        txtadd(dot,'<div style="background-color: ',get(borderColor),';width:10px;height:10px;"></div>');
+        copy(hotspot[get(hsp_name)].html,line);
+        copy(layer[get(hsDot)].html,dot);
+        <!-- txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();"); -->
+   
+        set_label_dir(get(hsp_name),get(lineDirection),0);
+        set_label_dir(get(hsLabel),get(lineDirection),1);
+        set_label_dir(get(hsDot),get(lineDirection),2);
 
-      if(%2 LE 2,
+       );
+      if(get(hsp_type) LE 2,
+        trace('edit2');
+        txtadd(iconUrl,'',%4);
+        txtreplace(iconUrl,'|',',');
         set(hotspot[get(hsp_name)].height,%8);
-        set(hotspot[get(hsp_name)].width,'prop');
+        set(hotspot[get(hsp_name)].width,%8);
+
         set_label_pos(get(hsLabel),get(pos));
+        set(hotspot[get(hsp_name)].url,get(iconUrl));
+        set(hotspot[get(hsp_name)].rotate,0);
+        set(layer[get(hsLabel)].rotate,0);
+          set(layer[get(hsDot)].visible,false);
+  
+        <!-- copy(hotspot[get(hsp_name)].html,''); -->
        );
-      if(%2 == 3,
-       trace('edit3');
-      );
+   
 
 </action>
 
@@ -331,8 +385,7 @@
        txtadd(hsName, '', get(name)); 
        txtreplace(hsName, 'tooltip_', ''); 
        txtreplace(hsName, 'tooldot_', ''); 
-
-    <!-- copy(drag_currentx, x);
+                <!-- copy(drag_currentx, x);
         copy(drag_currenty, y);
         copy(drag_stagex, mouse.stagex); 
         copy(drag_stagey, mouse.stagey);
@@ -349,12 +402,12 @@
         sub(drag_adjusty,mouse.stagey, hotspotcentery); 
     
         asyncloop(
-            <!-- 计算热点中心点 -->
+                        <!-- 计算热点中心点 -->
             pressed,
             sub(dx, mouse.stagex, drag_adjustx);
             sub(dy, mouse.stagey, drag_adjusty);
             screentosphere(dx, dy, ath, atv); 
-            <!-- 更新 -->
+                        <!-- 更新 -->
             copy(hotspot[get(hsName)].ath, ath);
             copy(hotspot[get(hsName)].atv, atv);,
             set(global.ath,get(ath));
@@ -363,6 +416,14 @@
 
 </action>
 
+<action name='JQlayerClick'>
+       txtadd(clickName, '', get(name)); 
+       txtreplace(clickName, 'tooltip_', ''); 
+       txtreplace(clickName, 'tooldot_', ''); 
+               <!-- trace('JQlayerClick',get(clickName)); -->
+       js(__krfn.utils.linkopen(get(hotlink),get(clickName)));
+</action>
+
 <action name="dragJQhotspot">
         trace('dragJQhotspot::',ath,atv);
 
@@ -374,8 +435,7 @@
             pressed, 
             sub(dx, mouse.stagex, drag_adjustx);
             sub(dy, mouse.stagey, drag_adjusty);
-            screentosphere(dx, dy, ath, atv);,
-            trace('last-ath1::',get(ath),'last-atv::',get(atv));
+            screentosphere(dx, dy, ath, atv);
         );
 </action>
 </krpano>

+ 2 - 1
packages/qjkankan-editor/src/core/utils.js

@@ -64,7 +64,6 @@ export default class Utils {
       const hotspotString = hotspotStyle.join('|');
       const hotspotSize = (Number(hotspot.size) || 1) * 50;
       let icon = hotspot.icon.replace(/,/g, '|');
-
       const callString = `editJQHotspot(
         ${hotspot.id},
         ${hotspot.type},
@@ -77,6 +76,7 @@ export default class Utils {
         ${hotspot.visible},
         "${hotspotString}"
         )`;
+      // krpano.stopcall(callString);
       krpano.call(callString);
     } catch (error) {
       console.error('error', error);
@@ -192,6 +192,7 @@ export default class Utils {
    */
 
   linkopen(sceneCode, id) {
+    // debugger;
     if (window.location.pathname.indexOf('show') > -1) {
       vue.$bus.emit('clickHotspot', id)
     }

+ 12 - 9
packages/qjkankan-editor/src/views/hotspot/EditPanel.vue

@@ -243,8 +243,8 @@ export default {
       handler(val) {
         // console.error("this.hotspot", val);
         console.error("hotspot", val);
-        this.$bus.emit('edithotspot',val);
-        console.log('this.$bus',this.$bus);
+        this.$bus.emit("edithotspot", val);
+        console.log("this.$bus", this.$bus);
         // this.$getKrpano().call("removeJQHotspot(" + val.name + ");");
         // this.$bus.emit("addhotspot", val);
       },
@@ -467,16 +467,15 @@ export default {
       });
     },
   },
+  beforeDestroy() {
+    this.$bus.off("edithotspot", this.handleEditHotspot);
+    this.$bus.off("delhotspot", this.cancel);
+  },
   mounted() {
     this.$bus.on("resethotspotTitle", this.listerFnReset);
 
-    this.$bus.on("delhotspot", () => {
-      this.cancel();
-    });
-    this.$bus.on("edithotspot", (data) => {
-      const krpano = document.getElementById("krpanoSWFObject");
-      __krfn.utils.edithotspot(krpano, data);
-    });
+    this.$bus.on("delhotspot", this.cancel);
+    this.$bus.on("edithotspot", this.handleEditHotspot);
 
     setTimeout(() => {
       if (
@@ -490,6 +489,10 @@ export default {
   },
 
   methods: {
+    handleEditHotspot(data) {
+      const krpano = document.getElementById("krpanoSWFObject");
+      __krfn.utils.edithotspot(krpano, data);
+    },
     handleSceneSelect(data) {
       this.hotspot.secne = {
         ...data,

+ 2 - 2
packages/qjkankan-editor/src/views/hotspot/HotSpotList.vue

@@ -177,8 +177,8 @@ export default {
     });
 
     this.$bus.on("openHotspot", (data) => {
-      let idx = this.someData.hotspots.findIndex((item) => item.name == data);
-      console.log(data);
+      let idx = this.someData.hotspots.findIndex((item) => item.name.toLowerCase() == data.toLowerCase());
+      // console.log(data);
       if (data == this.hotspot.name) {
         window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
         if (!this.showPanel) {

+ 2 - 2
packages/qjkankan-editor/src/views/hotspot/hotspotIconType/personalized_tag.vue

@@ -322,10 +322,10 @@ export default {
             .filter((d) => {
               return d.id === id;
             });
-          console.log("selectNode", selectNode);
+          // console.log("selectNode", selectNode);
           selectNode.dispatch("click");
         }
-      }, 500);
+      }, 300);
     },
   },
   mounted() {