Index: /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/ImageDisplay.java
===================================================================
--- /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/ImageDisplay.java	(revision 14289)
+++ /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/ImageDisplay.java	(revision 14290)
@@ -97,4 +97,5 @@
 
         boolean mouseIsDragging = false;
+        long lastTimeForMousePoint = 0l;
         Point mousePointInImg = null;
 
@@ -120,6 +121,10 @@
 
             // Calculate the mouse cursor position in image coordinates, so that we can center the zoom
-            // on that mouse position.
-            if (e.getClickCount() == 1 || mousePointInImg == null) {
+            // on that mouse position. 
+            // To avoid issues when the user tries to zoom in on the image borders, this point is not calculated 
+            // again if there was less than 1.5seconds since the last event.
+            System.out.println(e);
+            if (e.getWhen() - lastTimeForMousePoint > 1500 || mousePointInImg == null) {
+            	lastTimeForMousePoint = e.getWhen();
                 mousePointInImg = comp2imgCoord(visibleRect, e.getX(), e.getY());
             }
