|
@@ -14,7 +14,7 @@
|
|
|
);
|
|
|
ifnot(%2 LE 1, set(hotspot[get(hsp_name)].type, 'text'));
|
|
|
|
|
|
- <!-- 其他标签 (0,1,2)-->
|
|
|
+ <!-- 其他标签 (0,1,2)-->
|
|
|
|
|
|
set(hotspot[get(hsp_name)].name,%1);
|
|
|
set(hotspot[get(hsp_name)].hotspottype,%2);
|
|
@@ -33,7 +33,7 @@
|
|
|
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);
|
|
|
+ txtsplit(%10,'|',fontSize,pos,isHover,borderColor,fillColor,textColor,isShowLine,isTextWrap,lineDirection,textDirection,textNumPerLine,duration,frameNumber,framewidth);
|
|
|
set(hotspot[get(hsp_name)].pos,pos);
|
|
|
txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();");
|
|
|
|
|
@@ -41,8 +41,14 @@
|
|
|
set(hotspot[get(hsp_name)].height,%8);
|
|
|
set(hotspot[get(hsp_name)].width,%8);
|
|
|
<!-- txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label(get(%1));"); -->
|
|
|
- );
|
|
|
- <!-- 个性化标签(3) -->
|
|
|
+ if(%2 == 2,
|
|
|
+ trace('ser_frame::',get(framewidth));
|
|
|
+ set(hotspot[get(hsp_name)].url,get(iconUrl));
|
|
|
+ set(hotspot[get(hsp_name)].framewidth,get(framewidth));
|
|
|
+ txtadd(hotspot[get(hsp_name)].onloaded,"trace('ser_frame1::',get(frameNumber));do_crop_animation(get(framewidth),get(framewidth),get(frameNumber));"););
|
|
|
+ );
|
|
|
+
|
|
|
+ <!-- 个性化标签(3) -->
|
|
|
if(%2 == 3,
|
|
|
set(hotspot[get(hsp_name)].height,80);
|
|
|
set(hotspot[get(hsp_name)].width,1);
|
|
@@ -58,6 +64,71 @@
|
|
|
addhotspot(get(hsp_name));
|
|
|
</action>
|
|
|
|
|
|
+ <action name="do_crop_animation">
|
|
|
+ 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, calc(1.0 / %3));
|
|
|
+ set(crop, '0|0|%1|%2');
|
|
|
+ if(frameRate GE 0,
|
|
|
+ setinterval(
|
|
|
+ calc('crop_anim_' + name),
|
|
|
+ get(frameRate),
|
|
|
+ if(loaded,
|
|
|
+ inc(frame);
|
|
|
+ if(frame GE frames, if(onlastframe !== null, onlastframe() ); set(frame,0); );
|
|
|
+ mod(xpos,frame, xframes);
|
|
|
+ div(ypos, frame, xframes);
|
|
|
+
|
|
|
+ Math.floor(ypos);
|
|
|
+ mul(xpos, %1);
|
|
|
+ mul(ypos, %2);
|
|
|
+ calc(crop, xpos +'|' + ypos + '|%1|%2');
|
|
|
+ <!-- trace('onging::',get(crop)); -->
|
|
|
+ if(animatiedOn == 0,
|
|
|
+ clearinterval(calc('crop_anim_' + name));
|
|
|
+ );
|
|
|
+ if(frames == -1,
|
|
|
+ set(crop, '0|0|204|204');
|
|
|
+ );,
|
|
|
+ clearinterval(calc('crop_anim_' + name));
|
|
|
+ );
|
|
|
+ );
|
|
|
+ );
|
|
|
+ </action>
|
|
|
+
|
|
|
+ <action name="crop_animation_reapply">
|
|
|
+ txtadd(cur,'',%1);
|
|
|
+ tolower(cur, cur);
|
|
|
+ txtadd(frameRate,'',%2);
|
|
|
+ set(frame,0);
|
|
|
+ set(curIn, calc('crop_anim_' + cur));
|
|
|
+ clearinterval(curIn);
|
|
|
+ if(get(frameRate) GE 0,
|
|
|
+ setinterval(curIn,
|
|
|
+ get(frameRate),
|
|
|
+ copy(frames, hotspot[get(hsp_name)].frames);
|
|
|
+ copy(xframes, hotspot[get(hsp_name)].xframes);
|
|
|
+ copy(yframes, hotspot[get(hsp_name)].yframes);
|
|
|
+ copy(on, hotspot[get(hsp_name)].on);
|
|
|
+ copy(framewidth, hotspot[get(hsp_name)].framewidth);
|
|
|
+ inc(frame);
|
|
|
+ if(frame GE frames, set(frame,0); );
|
|
|
+ mod(xpos,frame, xframes);
|
|
|
+ div(ypos, frame, xframes);
|
|
|
+ Math.floor(ypos);
|
|
|
+ mul(xpos, framewidth);
|
|
|
+ mul(ypos,framewidth);
|
|
|
+ if(animatiedOn == 0, clearinterval(curIn););
|
|
|
+ calc(crop, xpos +'|' + ypos + '|'+framewidth +'|' + framewidth);
|
|
|
+ trace('replay-crop::',get(frames));
|
|
|
+ copy(hotspot[get(hsp_name)].crop,crop);
|
|
|
+ );
|
|
|
+ );
|
|
|
+
|
|
|
+ </action>
|
|
|
|
|
|
<action name="add_tooltip_label">
|
|
|
txtadd(tooltipname, 'tooltip_', get(name));
|
|
@@ -130,7 +201,7 @@
|
|
|
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); -->
|
|
|
<!-- call(set_label_dir); -->
|
|
@@ -228,13 +299,6 @@
|
|
|
|
|
|
copy(lwidth, layer[get(posName)].width);
|
|
|
copy(lheight, layer[get(posName)].height);
|
|
|
-
|
|
|
- <!-- copy(pptest, hotspot[get(hp)].pixelwidth); -->
|
|
|
-<!--
|
|
|
- trace('hp::',get(hp),'::label::',get(posName),'::pos::',get(pos));
|
|
|
-
|
|
|
- trace('tip1::',get(hwidth),'height::',get(hheight));
|
|
|
- trace('tip2::',get(lwidth),'height::',get(lheight)); -->
|
|
|
|
|
|
if(
|
|
|
pos == 'top',
|
|
@@ -293,6 +357,7 @@
|
|
|
showlog();
|
|
|
set(hsp_name,%1);
|
|
|
set(hsp_type,%2);
|
|
|
+ set(dImage,'static/panoassets/images/hotspot/image_place_holder.png');
|
|
|
txtadd(hsLabel, 'tooltip_', %1);
|
|
|
txtadd(hsDot, 'tooldot_', %1);
|
|
|
set(hotspot[get(hsp_name)].hotspottitle,%3);
|
|
@@ -301,7 +366,7 @@
|
|
|
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);
|
|
|
+ txtsplit(%10,'|',fontSize,pos,isHover,borderColor,fillColor,textColor,isShowLine,isTextWrap,lineDirection,textDirection,textNumPerLine,duration,frameNumber,framewidth);
|
|
|
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);
|
|
@@ -319,12 +384,13 @@
|
|
|
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);
|
|
|
+ set(layer[get(hsDot)].visible,true);
|
|
|
<!-- txtadd(hotspot[get(hsp_name)].onloaded,"add_tooltip_label();add_tooltip_dot();"); -->
|
|
|
|
|
|
set_label_dir(get(hsp_name),get(lineDirection),0);
|
|
@@ -336,22 +402,38 @@
|
|
|
trace('edit2');
|
|
|
txtadd(iconUrl,'',%4);
|
|
|
txtreplace(iconUrl,'|',',');
|
|
|
+ trace('iconUrl::',iconUrl);
|
|
|
set(hotspot[get(hsp_name)].height,%8);
|
|
|
set(hotspot[get(hsp_name)].width,%8);
|
|
|
|
|
|
delayedcall(0.1,
|
|
|
txtadd(tooltipname, 'tooltip_', get(hsp_name));
|
|
|
- <!-- trace('de-set_label_pos::',get(layer[get(tooltipname)].pos)); -->
|
|
|
set_label_pos(get(tooltipname),get(layer[get(tooltipname)].pos));
|
|
|
);
|
|
|
- <!-- set_label_pos(get(hsLabel),get(pos)); -->
|
|
|
-
|
|
|
+ <!-- 序列化类型编辑 -->
|
|
|
+ if(get(hsp_type) == 2,
|
|
|
+ indexoftxt(index, get(iconUrl), 'image_place_holder.png');
|
|
|
+ trace('frameNumber::',get(frameNumber));
|
|
|
+ trace('framewidth::',get(framewidth));
|
|
|
+ trace('duration::',get(duration));
|
|
|
+ if(get(index) GT -1,set(hotspot[get(hsp_name)].animatiedOn,0); set(hotspot[get(hsp_name)].frames,-1););
|
|
|
+ ifnot(get(index) GT -1,
|
|
|
+ set(hotspot[get(hsp_name)].animatiedOn,1);
|
|
|
+ set(hotspot[get(hsp_name)].frames,get(frameNumber));
|
|
|
+ calc(frameRate, duration / frameNumber);
|
|
|
+ trace('frameRate::',get(frameRate));
|
|
|
+ set(hotspot[get(hsp_name)].frameRate,get(frameRate));
|
|
|
+ <!-- set(hotspot[get(hsp_name)].on,get(frameRate)); -->
|
|
|
+ crop_animation_reapply(get(hsp_name),get(frameRate),get(frameNumber));
|
|
|
+
|
|
|
+ );
|
|
|
+ );
|
|
|
+
|
|
|
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,''); -->
|
|
|
);
|
|
|
|
|
|
|