
 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
 //                                                                        
 //  This file was created by rjc from system/js/ii_marker_drag.js%
 //  on 2003/11/11 10:37:25.
 //                                                                        
 //    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
 //  
 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
function marker_drag_start(name,cx,cy,type,size,width){var m=markers_add(name,"DRAG",cx,cy,type,size,width);
m.priority=100;m.dragStartCx=cx;m.dragStartCy=cy;markers_display(m);
m.dragStartPx=m.marker.getX();m.dragStartPy=m.marker.getY();return m;
}function marker_drag_end(m){marker_drag_update(m);markers_undisplay(m);
}function marker_drag_update_all(){var i;for(i=0;i<all_markers.length;i++)
{var mk=all_markers[i];if(mk.klass=="DRAG")marker_drag_update(mk);
}}function marker_drag_update(m){if(m.marker!=null){var x=m.marker.getX();
var y=m.marker.getY();if(x==m.dragStartPx&&y==m.dragStartPy){
m.cx=m.dragStartCx;m.cy=m.dragStartCy;}else {var p=the_easel.screenPointToWorld(x,y);
m.cx=p.x+""-0;m.cy=p.y+""-0;}}}function marker_drag_reset(mk)
{markers_move(mk,mk.dragStartCx,mk.dragStartCy);}
