瀏覽代碼

临时保存

gemercheung 2 年之前
父節點
當前提交
eeb5f68fdb

File diff suppressed because it is too large
+ 6 - 8
packages/qjkankan-editor/public/static/lib/krpano/js/tour copy.js


File diff suppressed because it is too large
+ 14 - 0
packages/qjkankan-editor/public/static/lib/krpano/js/tour-1.19-pr13.js


File diff suppressed because it is too large
+ 12 - 0
packages/qjkankan-editor/public/static/lib/krpano/js/tour-1.20.11.js


+ 147 - 0
packages/qjkankan-editor/public/static/template/customTooltip.xml

@@ -0,0 +1,147 @@
+<krpano>
+
+    <action name="addImgTextHotSpot">
+        showlog();
+        set(schp_name,%2); 
+        set(hotspot[get(schp_name)].type,'text');
+                                                <!-- set(hotspot[get(schp_name)].url,%1); -->
+        set(hotspot[get(schp_name)].ath,%4);
+        set(hotspot[get(schp_name)].atv,%5);
+        set(hotspot[get(schp_name)].hotspottitle,%3);
+        set(hotspot[get(schp_name)].wordcontent,%9);
+        set(hotspot[get(schp_name)].hotspotlink,%8);
+        set(hotspot[get(schp_name)].alpha,1);
+        set(hotspot[get(schp_name)].scale,1);
+        set(hotspot[get(schp_name)].autoalpha,false);
+        set(hotspot[get(schp_name)].distorted,false);
+                                                <!-- set(hotspot[get(schp_name)].width,'prop');
+        set(hotspot[get(schp_name)].height,%11); -->
+        set(hotspot[get(schp_name)].width, 1); 
+        set(hotspot[get(schp_name)].height,70); 
+        set(hotspot[get(schp_name)].visible,true);
+                                                <!-- set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext));  -->
+        addhotspot(get(schp_name));
+        set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
+  
+        if(%7 == false,
+          , 
+          set(hotspot[get(schp_name)].ondown,draghotspot1(););
+          set(hotspot[get(schp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
+        );
+
+                                                <!-- txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip(hotspot[get(name)].hotspottitle);"); -->
+        <!-- txtadd(hotspot[get(schp_name)].onloaded,"add_all_2_tooltip(hotspot[get(name)].hotspottitle);"); -->
+        <!-- txtadd(hotspot[get(schp_name)].onloaded,"add_all_2_tooltip(hotspot[get(name)].hotspottitle);"); -->
+        txtadd(hotspot[get(schp_name)].onloaded,"add_all_2_tooltip();");
+                                                <!-- txtadd(hotspot[get(schp_name)].onloaded,"add_all_2_tooltip(hotspot[get(name)].hotspottitle,hotspot[get(name)].ath,hotspot[get(name)].atv);"); -->
+     
+        set(hotspot[get(schp_name)].onhover,null);
+        set(hotspot[get(schp_name)].onout,null);
+        set(hotspot[get(schp_name)].onover,null);
+       
+      <!-- if(%10 == true,
+          set(plugin[get(tooltipname)].visible,true);,
+          set(plugin[get(tooltipname)].visible,false);
+        ); -->
+        <!-- txtadd(csstxt, 'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:', %12,'px');
+        set(plugin[get(tooltipname)].css,get(csstxt)));, -->
+  
+    </action>
+
+
+    <action name="add_all_2_tooltip">
+        txtadd(tooltipname2, 'tooltip2_', get(name)); 
+        set(toolP,get(name)); 
+        trace('parentName::',get(name));
+        addlayer(get(tooltipname2));
+        txtadd(layer[get(tooltipname2)].parent, 'hotspot[', get(name), ']');
+        set(layer[get(tooltipname2)].autowidth, true);
+        set(layer[get(tooltipname2)].width,'prop');
+        set(layer[get(tooltipname2)].height,30); 
+        set(layer[get(tooltipname2)].edge,ce);
+        set(layer[get(tooltipname2)].background,false);
+        set(layer[get(tooltipname2)].x,0);
+        set(layer[get(tooltipname2)].y,-50);
+        set(layer[get(tooltipname2)].padding,0);
+        set(layer[get(tooltipname2)].type,'html');
+        set(layer[get(tooltipname2)].url,'%SWFPATH%/plugins/textfield.swf');
+        set(layer[get(tooltipname2)].border,false);
+        set(layer[get(tooltipname2)].align,center);
+        set(layer[get(tooltipname2)].ath,0);
+        set(layer[get(tooltipname2)].atv,0);
+
+        trace(get(name),'--ath::',get(hotspot[get(name)].ath));
+        trace(get(name),'--atv::',get(hotspot[get(name)].atv));
+        <!-- set(layer[get(tooltipname2)].ath,get(hotspot[get(schp_name)].ath);
+        set(layer[get(tooltipname2)].atv,get(hotspot[get(schp_name)].atv); -->
+        set(layer[get(tooltipname2)].ondown,'draglayer();');
+        <!-- set(layer[get(tooltipname2)].ondown,'draghotspot1()'); -->
+
+        txtadd(labelCode, '<div style="display: flex; align-items: center; justify-content: center; position: relative; border: 0px solid rgba(255,255,255,1); padding: 6px 10px; white-space: pre; border-radius: 5px; background: rgba(0,0,0,0.5);">','            <div style="text-align: left; font-size: 12px; color: rgba(255,255,255,1); line-height: 1.4;">',get(hotspottitle),'</div></div>'); 
+
+        copy(layer[get(tooltipname2)].html, labelCode)
+            
+    </action>
+
+
+    <action name="draglayer"> 
+       txtadd(hsName, '', get(name)); 
+       txtreplace(hsName, 'tooltip2_', ''); 
+
+        <!-- spheretoscreen(ath, atv, x, y, 'l'); -->
+
+        copy(drag_currentx, x);
+        copy(drag_currenty, y);
+        copy(drag_stagex, mouse.stagex); 
+        copy(drag_stagey, mouse.stagey);
+        indexoftxt(align_contains_right, get(align), 'right');
+        indexoftxt(align_contains_bottom, get(align), 'bottom'); 
+        calc(drag_align_x, align_contains_right GE 0 ? -1 : +1);
+        calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1);   
+        
+        <!-- 计算热点中心点 -->
+
+        copy(hx, hotspot[get(hsName)].x);
+        copy(hy, hotspot[get(hsName)].y);
+
+
+
+        asyncloop(
+            pressed,
+             calc(x, drag_currentx + (mouse.stagex - drag_stagex) * drag_align_x);
+             calc(y, drag_currenty + (mouse.stagey - drag_stagey) * drag_align_y);
+    
+             <!-- trace('debug-callout::','hx::',hotspot[get(hsName)]); -->
+             <!-- sub(dx, mouse.stagex, x);
+             sub(dy, mouse.stagey, y);
+             screentosphere(dx, dy, ath, atv);  -->
+             <!-- set(hotspot[get(tooltipName)].width,20); -->
+             <!-- trace('hp1::',x,y);
+             trace('hp2::',dx,dy); -->
+             <!-- set(hotspot[get(tooltipName)].ath,ath);
+             set(hotspot[get(tooltipName)].atv,atv); -->
+             <!-- set(hotspot[%1].atv,atv); -->
+             <!-- trace('draglayer-callout::','ath::',ath,'atv::',atv); -->
+        );   
+   
+  
+
+    </action>
+
+
+    <action name="draghotspot1">
+    
+        <!-- trace('draghotspot1-callin::','ath::',ath,'atv::',atv); -->
+        spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, 'l');
+        sub(drag_adjustx,mouse.stagex, hotspotcenterx);
+        sub(drag_adjusty,mouse.stagey, hotspotcentery); 
+
+        asyncloop(
+            pressed, 
+            sub(x, mouse.stagex, drag_adjustx);
+            sub(y, mouse.stagey, drag_adjusty);
+            screentosphere(x, y, ath, atv); 
+            trace('draghotspot1-callout::','ath::',ath,'atv::',atv);
+        );
+    </action>
+</krpano>

File diff suppressed because it is too large
+ 379 - 400
packages/qjkankan-editor/public/static/template/skin/vtourskin.xml


File diff suppressed because it is too large
+ 39 - 0
packages/qjkankan-editor/public/static/template/test.xml


+ 1 - 0
packages/qjkankan-editor/src/core/angle.js

@@ -17,6 +17,7 @@ export default class Angle {
    * @param {*} hotspotType 
    */
   updateHotSpotData(hsName, hpname, ath, atv) {
+    console.log('updateHotSpotData',arguments)
     this.ath = ath;
     this.atv = atv;
     if (ath && atv ) {

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

@@ -170,7 +170,8 @@ export default {
       let hptarget = this.someData.hotspots.find(
         (item) => item.name.toLowerCase() == data.hpname.toLowerCase()
       );
-      console.log(hptarget);
+      console.log(" this.someData.hotspots", this.someData.hotspots);
+      console.log("hptarget", hptarget);
       hptarget.ath = data.ath;
       hptarget.atv = data.atv;
     });