diff webapp/src/main/webapp/jquery/jquery.digilib.vector.js @ 1351:76b72fa16012

immediate reaction on when dragging and keys x or y are pressed
author hertzhaft
date Mon, 09 Feb 2015 10:19:12 +0100
parents 81d5135ceafc
children d8271e1e9ce2
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.vector.js	Mon Feb 09 09:20:28 2015 +0100
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.vector.js	Mon Feb 09 10:19:12 2015 +0100
@@ -470,7 +470,7 @@
     		delete shape.$elem;
     	}
     };
-    
+
     /**
      * return a vertexDragHandler function.
      * 
@@ -508,9 +508,9 @@
 
         var dragMove = function (evt) { // dragging
             var pt = geom.position(evt);
+            pt.clipTo(imgRect);
             shape.properties.screenpos[vtx] = pt;
             $(data).trigger('positionShape', shape);
-            pt.clipTo(imgRect);
             // move handle
             $handle.attr({'x': pt.x-hs/2, 'y': pt.y-hs/2});
             // update shape SVG element