|
@@ -1,10 +1,10 @@
|
|
|
<krpano>
|
|
|
-
|
|
|
- <action name="addImgTextHotSpot">
|
|
|
+ <!-- 1.20. 新热点模式 -->
|
|
|
+ <action name="addJQHotspot">
|
|
|
showlog();
|
|
|
set(schp_name,%2);
|
|
|
set(hotspot[get(schp_name)].type,'text');
|
|
|
- <!-- set(hotspot[get(schp_name)].url,%1); -->
|
|
|
+ <!-- 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);
|
|
@@ -14,19 +14,19 @@
|
|
|
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)].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)); -->
|
|
|
+ <!-- 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")));
|
|
|
+ <!-- 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);"); -->
|
|
@@ -48,7 +48,6 @@
|
|
|
|
|
|
</action>
|
|
|
|
|
|
-
|
|
|
<action name="add_all_2_tooltip">
|
|
|
txtadd(tooltipname2, 'tooltip2_', get(name));
|
|
|
set(toolP,get(name));
|
|
@@ -58,7 +57,7 @@
|
|
|
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)].edge,center);
|
|
|
set(layer[get(tooltipname2)].background,false);
|
|
|
set(layer[get(tooltipname2)].x,0);
|
|
|
set(layer[get(tooltipname2)].y,-50);
|
|
@@ -67,19 +66,11 @@
|
|
|
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)
|
|
|
+ copy(layer[get(tooltipname2)].html, labelCode);
|
|
|
|
|
|
</action>
|
|
|
|
|
@@ -87,61 +78,49 @@
|
|
|
<action name="draglayer">
|
|
|
txtadd(hsName, '', get(name));
|
|
|
txtreplace(hsName, 'tooltip2_', '');
|
|
|
-
|
|
|
- <!-- spheretoscreen(ath, atv, x, y, 'l'); -->
|
|
|
-
|
|
|
- copy(drag_currentx, x);
|
|
|
+
|
|
|
+ <!-- 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);
|
|
|
+ calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1);
|
|
|
|
|
|
- <!-- 计算热点中心点 -->
|
|
|
-
|
|
|
- copy(hx, hotspot[get(hsName)].x);
|
|
|
- copy(hy, hotspot[get(hsName)].y);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ -->
|
|
|
+
|
|
|
+ copy(hath, hotspot[get(hsName)].ath);
|
|
|
+ copy(hatv, hotspot[get(hsName)].atv);
|
|
|
+ spheretoscreen(hath, hatv, hotspotcenterx, hotspotcentery, 'l');
|
|
|
+ sub(drag_adjustx,mouse.stagex, hotspotcenterx);
|
|
|
+ sub(drag_adjusty,mouse.stagey, hotspotcentery);
|
|
|
+
|
|
|
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); -->
|
|
|
+ sub(dx, mouse.stagex, drag_adjustx);
|
|
|
+ sub(dy, mouse.stagey, drag_adjusty);
|
|
|
+ screentosphere(dx, dy, vath, vatv);
|
|
|
+ <!-- 更新 -->
|
|
|
+ copy(hotspot[get(hsName)].ath, vath);
|
|
|
+ copy(hotspot[get(hsName)].atv, vatv);
|
|
|
);
|
|
|
-
|
|
|
-
|
|
|
|
|
|
</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);
|
|
|
+ sub(dx, mouse.stagex, drag_adjustx);
|
|
|
+ sub(dy, mouse.stagey, drag_adjusty);
|
|
|
+ screentosphere(dx, dy, ath, atv);
|
|
|
);
|
|
|
</action>
|
|
|
</krpano>
|