<krpano>
  	<action name="_setmap">
 	if (Project.CustomMapTF==True,
		copy(map_name,plugin[spot_%1].parent);
		txtadd(radar_name,'radar_',get(map_name));
		txtadd(active_name,'spot_active_',get(map_name));
		_set_scenespot(get(radar_name),get(active_name),spot_%1,%1);
		
		<!-- 拖动地图处理部分   -->
		if (plugin[get(map_name)].dragmap==true,
		copy(box_name,plugin[get(map_name)].parent);
		copy(box_width,plugin[get(box_name)].width);
		copy(box_height,plugin[get(box_name)].height);
		div(box_width,box_width,2);
		div(box_height,box_height,2);
		sub(mx,box_width,plugin[spot_%1].x);
		sub(my,box_height,plugin[spot_%1].y);
		tween(plugin[get(map_name)].x,get(mx),0.5);tween(plugin[get(map_name)].y,get(my),0.5);,)
		<!-- 拖动地图处理部分   -->
    ,);
	if (Project.GoogleMapTF==True,
    if (set.GoogleMapTF==True, plugin[GoogleMap].activatespot(gg_spot_%1);plugin[GoogleMap].pantospot(gg_spot_%1);,)
	,);
  	</action>
  	<action name="_set_scenespot">
    <!-- 调用自定义地图场景  -->
    _hidenallmap_radar(%1,%2);
    set(plugin[%1].visible,true);
    set(plugin[%2].visible,true);
    
    copy(plugin[%1].x,plugin[%3].x);
    copy(plugin[%1].y,plugin[%3].y);
    copy(plugin[%2].x,plugin[%3].x);
    copy(plugin[%2].y,plugin[%3].y);
    copy(plugin[%2].hint,plugin[%3].hint);
    copy(plugin[%2].onhover,plugin[%3].onhover);
    copy(plugin[%1].heading,plugin[%3].heading);
    
    set(plugin[%3].icon_init,get(plugin[%3].icon_visit));
    set(plugin[%3].url,get(plugin[%3].icon_init));
	</action>
  	<action name="flyout">
    <!-- 热点漂浮   -->
    copy(backup_rx,rx);
    copy(backup_ry,ry);
    copy(backup_rz,rz);
    copy(backup_scale,scale);
	copy(backup_zorder,zorder);
    
    tween(rx, 0);
    tween(ry, 0);
    tween(rz, 0);
    tween(scale, %1);
	set(zorder,10000);
    
    tween(flying, 1.0);
	</action>
  	
	<action name="flyback">
    <!-- 热点缩回   -->
    tween(rx, get(backup_rx));
    tween(ry, get(backup_ry));
    tween(rz, get(backup_rz));
    tween(scale, get(backup_scale));
    set(zorder,get(backup_zorder));
    tween(flying, 0.0);
	</action>
	
	<action name="onhover_drag">
    <!-- 拖动鼠标移动   -->
	if (drag==true,
		sub(dx,mouse.x);sub(dy,mouse.y);
		
		if (align==right,mul(dx,-1),);
		if (align==righttop,mul(dx,-1),);
		if (align==rightbottom,mul(dx,-1),);
		
		if (align==bottom,mul(dy,-1),);
		if (align==leftbottom,mul(dy,-1),);
		if (align==rightbottom,mul(dy,-1),);
		
		sub(mx,x,dx);sub(my,y,dy);
		set(x,get(mx));set(y,get(my));
		copy(dx,mouse.x);copy(dy,mouse.y);delayedcall(0.1,onhover_drag();),
	)
    </action>
	
	<action name="ondown_drag">
    <!-- 拖动鼠标按下   -->
	set(drag,true);
	copy(dx,mouse.x);copy(dy,mouse.y);
    </action>
	
	<action name="onup_drag">
		<!-- 拖动鼠标抬起   -->
		if (drag==true,
			sub(dx,mouse.x);sub(dy,mouse.y);
		
			if (align==right,mul(dx,-1),);
			if (align==righttop,mul(dx,-1),);
			if (align==rightbottom,mul(dx,-1),);
			
			if (align==bottom,mul(dy,-1),);
			if (align==leftbottom,mul(dy,-1),);
			if (align==rightbottom,mul(dy,-1),);
			
			sub(mx,x,dx);sub(my,y,dy);
			tween(x,get(mx),0.1);tween(y,get(my),0.1);
			set(drag,false);
			js(setxy(););
			,
		)
    </action>
</krpano>
