
 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
 //                                                                        
 //  This file was created by rjc from system/js/ii_maps_callbacks.js%
 //  on 2003/11/11 10:37:27.
 //                                                                        
 //    Copyright 1999-2003 Interactive Information Ltd, All Rights Reserved 
 //    http://information.overlaid.com
 //                                                                        
 //  It is almost certainly a bad idea to edit it.
 //  
 //  ------------------------------------------------------------------------
 //  
 //  Version:	2.3.1 for Grange Scrapbook
 //  Features:	VZERO HSPOPUP DATACOPYRIGHT LABEL LINEAR MAPPING
 //  Scales:	linear
 //  Hotspots:	rect poly circle
 //  Markers:	cross image paintable
 //  
 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
var easel_last_stamp=null;function maps_click_stamp(map,spot,x,y,rad)
{if(spot==null){var r=map.getSelectedArea();if(r!=null)easel_last_stamp=[ r.x,r.y,r.width,r.height];
else easel_last_stamp=null;if(rad==null)rad=(the_easel.size().width+""-0)/10;
var x1=x+""-rad;var y1=y+""-rad;var x2=x+""-0+rad;var y2=y+""-0+rad;
map.setAreaScreen(x1,y1,x2,y2,true);return true;}return false;
}function maps_click_stamp2(map,spot,x,y){if(spot==null){var r=map.getSelectedArea();
if(r!=null)easel_last_stamp=[ r.x,r.y,r.width,r.height];else easel_last_stamp=null;
var nlevel=maps_level_down();if(nlevel!=null){var p1=the_easel.screenPointToWorld(x+""-0,y+""-0);
x=p1.x+""-0;y=p1.y+""-0;maps_quantise(x,y,nlevel);x=qcx;y=qcy;
w=current_mapset.size_w*nlevel.xgpp*0.9;h=current_mapset.size_h*nlevel.ygpp*0.9;
x-=w/2;y-=h/2;x=Math.floor(x+0.5);y=Math.floor(y+0.5);w=Math.floor(w+0.5);
h=Math.floor(h+0.5);map.setAreaWorld(x,y,x+w,y+h,true);}else {
w=current_w/10;h=current_h/10;x=x+""-0-w/2;y=y+""-0-h/2;map.setAreaScreen(x,y,x+w,y+h,true);
}return true;}return false;}function maps_click_unstamp(map,spot,x,y)
{if(easel_last_stamp!=null){map.setAreaScreen(easel_last_stamp[0],
easel_last_stamp[1],easel_last_stamp[0]+easel_last_stamp[2],easel_last_stamp[1]+easel_last_stamp[3],
true);return true;}return false;}function maps_click_scroll(map,spot,x,y,mapStep)
{if(spot!=null){var val=spot.name;if(val=="north"){maps_goto_delta(0,mapStep);
}else if(val=="south"){maps_goto_delta(0,-mapStep);}else if(val=="east")
{maps_goto_delta(mapStep,0);}else if(val=="west"){maps_goto_delta(-mapStep,0);
}else return false;return true;}return false;}
