<krpano>
<action name="draglayer_text">
		if(%1 != dragging,
			copy(drag_currenty, y);
			copy(drag_stagey, mouse.stagey);
			draglayer_text(dragging,%2);
		  ,
			if(pressed,
				sub(dy, mouse.stagey, drag_stagey);
				add(y1, drag_currenty, dy);
				add(y2, y1, pixelheight);
				sub(y2, %2);
				if(y1 GT 0, set(y1,0));
				if(y2 LT 0, sub(y1,y2));
				copy(y,y1);
				delayedcall(0, draglayer_text(dragging,%2) );
			  );
		  );
	</action>

	<action name="picture_resize">

	div(aspect, layer[%1].imagewidth, layer[%1].imageheight);
	mul(new_width, layer[get(layer[%1].parent)].width, 1);
	div(new_height, new_width, aspect);
	mul(max_height, layer[get(layer[%1].parent)].height, 1);
	if(new_height GT max_height,
		copy(new_height, max_height);
		mul(new_width, new_height, aspect);
	  );
	roundval(new_width);
	roundval(new_height);
	copy(layer[%1].width, new_width);
	copy(layer[%1].height, new_height);
   </action>

   <action name="picture_resize_stage">
	<!-- 使用屏幕宽度或高度的百分之九十 -->	
	div(aspect, layer[%1].imagewidth, layer[%1].imageheight);
	mul(new_width, stagewidth, 0.90);
	div(new_height, new_width, aspect);
	mul(max_height, stageheight, 0.90);
	if(new_height GT max_height,
		copy(new_height, max_height);
		mul(new_width, new_height, aspect);
	  );
	roundval(new_width);
	roundval(new_height);
	copy(layer[%1].width, new_width);
	copy(layer[%1].height, new_height);
</action>



   <textstyle name="DEFAULT"
           origin="cursor"
           edge="bottom"
           xoffset="0"
           yoffset="-3"
           fadeintime="0.0"
           showtime="0.1"
           fadetime="0.0"
           font="Times"
           fontsize="12.0"
           bold="true"
           italic="false"
           textcolor="0xFFFFFF"
           textalign="none"
           padding="1"
           css=""
           width=""
           height=""
           vcenter=""
           background="false"
           backgroundcolor="0xFFFFFF"
           backgroundalpha="1.0"
           border="fasle"
           bordercolor="0x000000"
           borderalpha="1.0"
           borderwidth="1.0"
           roundedge="0"
           shadow="0.0"
           shadowrange="4.0"
           shadowangle="45"
           shadowcolor="0x000000"
           shadowalpha="1.0"
           textshadow="0.0"
           textshadowrange="4.0"
           textshadowangle="45"
           textshadowcolor="0x000000"
           textshadowalpha="1.0"
           embeddedfonts="false"
           alpha="1.0"
           blendmode="normal"
           effect=""
           noclip="true"
           />
	</krpano>