|
@@ -8,7 +8,7 @@
|
|
|
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));
|
|
|
);
|
|
@@ -37,35 +37,33 @@
|
|
|
set(hotspot[get(hsp_name)].pos,pos);
|
|
|
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,%8);
|
|
|
- set(hotspot[get(hsp_name)].crop,'');
|
|
|
-
|
|
|
- <!-- 默认 -->
|
|
|
- if(%2 == 0,
|
|
|
- txtreplace(iconUrl,'.svg','.png');
|
|
|
- trace('system::',get(iconUrl));
|
|
|
- set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
- set(hotspot[get(hsp_name)].frameNumber,60);
|
|
|
- set(hotspot[get(hsp_name)].duration,1);
|
|
|
- set(hotspot[get(hsp_name)].frameRate,calc(1.0 / 60));
|
|
|
- set(hotspot[get(hsp_name)].framewidth,84);
|
|
|
- <!-- txtadd(hotspot[get(hsp_name)].onloaded,"do_crop_animation(84,84,60);"); -->
|
|
|
-
|
|
|
- );
|
|
|
-
|
|
|
- if(%2 == 2,
|
|
|
- trace('ser_frame::',get(framewidth));
|
|
|
- set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
- set(hotspot[get(hsp_name)].framewidth,get(framewidth));
|
|
|
- set(hotspot[get(hsp_name)].frameNumber,get(frameNumber));
|
|
|
- crop_animation_r_stop(get(hsp_name));
|
|
|
-
|
|
|
+ if(%2 LE 2,
|
|
|
+ set(hotspot[get(hsp_name)].height,%8);
|
|
|
+ set(hotspot[get(hsp_name)].width,%8);
|
|
|
+ set(hotspot[get(hsp_name)].crop,'');
|
|
|
+
|
|
|
+
|
|
|
+ if(%2 == 0,
|
|
|
+ txtreplace(iconUrl,'.svg','.png');
|
|
|
+ trace('system::',get(iconUrl));
|
|
|
+ set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
+ set(hotspot[get(hsp_name)].frameNumber,60);
|
|
|
+ set(hotspot[get(hsp_name)].duration,1);
|
|
|
+ set(hotspot[get(hsp_name)].frameRate,calc(1.0 / 60));
|
|
|
+ set(hotspot[get(hsp_name)].framewidth,84);
|
|
|
+ );
|
|
|
+
|
|
|
+ if(%2 == 2,
|
|
|
+ trace('ser_frame::',get(framewidth));
|
|
|
+ set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
+ set(hotspot[get(hsp_name)].framewidth,get(framewidth));
|
|
|
+ set(hotspot[get(hsp_name)].frameNumber,get(frameNumber));
|
|
|
+ );
|
|
|
);
|
|
|
|
|
|
<!-- 个性化标签(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);
|
|
@@ -74,21 +72,23 @@
|
|
|
copy(hotspot[get(hsp_name)].html,line);
|
|
|
<!-- txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();"); -->
|
|
|
set_label_dir(get(hsp_name),get(lineDirection),0);
|
|
|
-
|
|
|
);
|
|
|
- txtadd(hotspot[get(hsp_name)].onloaded,"do_crop_animation(get(framewidth),get(framewidth),get(frameRate));"););
|
|
|
+
|
|
|
+ txtadd(hotspot[get(hsp_name)].onloaded,"do_crop_animation(get(framewidth),get(framewidth),get(frameRate));");
|
|
|
trace('last_add::',hotspot[get(hsp_name)].onloaded);
|
|
|
addhotspot(get(hsp_name));
|
|
|
</action>
|
|
|
|
|
|
<action name="do_crop_animation">
|
|
|
+ <!-- 1 square:(w/h) 2:imageW 3 imageH 4 frameRate -->
|
|
|
+ trace('imagewidth::',imagewidth,'::imageheight::',imageheight);
|
|
|
registerattribute(xframes, calc((imagewidth / %1) BOR 0));
|
|
|
registerattribute(yframes, calc((imageheight / %2) BOR 0));
|
|
|
registerattribute(frames, calc(xframes * yframes));
|
|
|
registerattribute(frame, 0);
|
|
|
registerattribute(animatiedOn, 1);
|
|
|
registerattribute(frameRate, %3);
|
|
|
- trace('imagewidth::',imagewidth,'::imageheight::',imageheight);
|
|
|
+
|
|
|
set(crop, '0|0|%1|%2');
|
|
|
clearinterval(calc('crop_anim_' + name));
|
|
|
if(%3 == '' OR frameRate == 0 OR isNaN(frameRate),
|
|
@@ -106,6 +106,7 @@
|
|
|
get(frameRate),
|
|
|
if(loaded,
|
|
|
inc(frame);
|
|
|
+
|
|
|
<!-- trace('frame::',get(frame),'xframes2::',get(xframes),'::yframes2::',get(yframes)); -->
|
|
|
if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
|
|
|
mod(xpos,frame, xframes);
|
|
@@ -124,14 +125,14 @@
|
|
|
);
|
|
|
);
|
|
|
</action>
|
|
|
- <action name="crop_animation_r_stop">
|
|
|
+ <!-- <action name="crop_animation_r_stop">
|
|
|
set(cur,%1);
|
|
|
tolower(cur, cur);
|
|
|
set(curIn, calc('crop_anim_r_' + cur));
|
|
|
clearinterval(curIn);
|
|
|
- </action>
|
|
|
+ </action> -->
|
|
|
|
|
|
- <action name="crop_animation_reapply">
|
|
|
+ <!-- <action name="crop_animation_reapply">
|
|
|
txtadd(cur,'',%1);
|
|
|
tolower(cur, cur);
|
|
|
txtadd(frameRate,'',%2);
|
|
@@ -162,15 +163,16 @@
|
|
|
if(frames == -1,
|
|
|
copy(hotspot[get(hsp_name)].crop,'0|0|204|204');
|
|
|
);
|
|
|
- <!-- trace('replaying::',get(frame)); -->
|
|
|
+
|
|
|
copy(hotspot[get(hsp_name)].crop,crop);
|
|
|
);
|
|
|
);
|
|
|
|
|
|
- </action>
|
|
|
+ </action> -->
|
|
|
|
|
|
<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));
|
|
@@ -195,7 +197,7 @@
|
|
|
|
|
|
set(layer[get(tooltipname)].onclick,JQlayerClick);
|
|
|
set(layer[get(tooltipname)].onup,js(console.log('1');__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>');
|
|
|
|
|
@@ -211,12 +213,14 @@
|
|
|
|
|
|
<!-- 个性化标签(3) -->
|
|
|
if(get(hotspottype) == 3,
|
|
|
+ trace('add_tooltip_label::',get(lineDirection));
|
|
|
set(layer[get(tooltipname)].direction,get(lineDirection));
|
|
|
delayedcall(0.2,txtadd(tooltipname, 'tooltip_', get(name)); set_label_dir(get(tooltipname),get(layer[get(tooltipname)].direction),1); );
|
|
|
|
|
|
|
|
|
);
|
|
|
copy(layer[get(tooltipname)].html, labelCode);
|
|
|
+
|
|
|
|
|
|
</action>
|
|
|
<!-- <style name="tooltip_dot_bg" type="container" border-radius="50%" bgcolor="0xFFFFFF" bgalpha="0.9" height="20" width="20" keep="true" /> -->
|
|
@@ -409,8 +413,8 @@
|
|
|
</action>
|
|
|
|
|
|
<action name="cancelJQHotspot">
|
|
|
- set(canclHotspot,%1);
|
|
|
- crop_animation_r_stop(%1);
|
|
|
+ <!-- set(canclHotspot,%1); -->
|
|
|
+ <!-- crop_animation_r_stop(%1); -->
|
|
|
</action>
|
|
|
|
|
|
<!-- 编辑热点 -->
|
|
@@ -444,7 +448,7 @@
|
|
|
copy(layer[get(hsLabel)].rotate,0);
|
|
|
|
|
|
set(hotspot[get(hsp_name)].type,"text");
|
|
|
- set(hotspot[get(hsp_name)].width,1);
|
|
|
+ set(hotspot[get(hsp_name)].width,1);
|
|
|
set(hotspot[get(hsp_name)].width,1);
|
|
|
set(hotspot[get(hsp_name)].height,80);
|
|
|
set(hotspot[get(hsp_name)].padding,0);
|
|
@@ -479,9 +483,13 @@
|
|
|
|
|
|
if(get(hsp_type) == 0,
|
|
|
txtreplace(iconUrl,'.svg','.png');
|
|
|
- trace('system::',get(iconUrl));
|
|
|
- set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
+ <!-- trace('system::',get(iconUrl));
|
|
|
+ set(hotspot[get(hsp_name)].url,get(iconUrl)); -->
|
|
|
set(hotspot[get(hsp_name)].animatiedOn,1);
|
|
|
+ set(hotspot[get(hsp_name)].framewidth,84);
|
|
|
+ set(hotspot[get(hsp_name)].frameRate,calc( 1.0 / 60));
|
|
|
+ set(hotspot[get(hsp_name)].xframes,40);
|
|
|
+ set(hotspot[get(hsp_name)].yframes,1);
|
|
|
);
|
|
|
if(get(hsp_type) == 1,
|
|
|
set(hotspot[get(hsp_name)].animatiedOn,0);
|
|
@@ -497,10 +505,16 @@
|
|
|
trace('frameNumber::',get(frameNumber));
|
|
|
trace('framewidth::',get(framewidth));
|
|
|
trace('duration::',get(duration));
|
|
|
-
|
|
|
+
|
|
|
+ set(hotspot[get(hsp_name)].xframes, 1);
|
|
|
+
|
|
|
+
|
|
|
if(!isNaN(frameRate) AND frameRate GT 0,set(hotspot[get(hsp_name)].frameRate,get(frameRate)));
|
|
|
if(!isNaN(framewidth) AND framewidth GT 0,set(hotspot[get(hsp_name)].framewidth,get(framewidth)));
|
|
|
- if(!isNaN(frameNumber) AND frameNumber GT 0,set(hotspot[get(hsp_name)].frameNumber,get(frameNumber)));
|
|
|
+ if(!isNaN(frameNumber) AND frameNumber GT 0,
|
|
|
+ set(hotspot[get(hsp_name)].frameNumber,get(frameNumber));
|
|
|
+ set(hotspot[get(hsp_name)].yframes, get(frameNumber));
|
|
|
+ );
|
|
|
|
|
|
<!-- trace('animatiedOn::',get(hotspot[get(hsp_name)].animatiedOn)); -->
|
|
|
<!-- set(hotspot[get(hsp_name)].frameNumber,get(frameNumber));
|