Changeset 14290 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-03-27T15:48:22+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/ImageDisplay.java
r13497 r14290 97 97 98 98 boolean mouseIsDragging = false; 99 long lastTimeForMousePoint = 0l; 99 100 Point mousePointInImg = null; 100 101 … … 120 121 121 122 // Calculate the mouse cursor position in image coordinates, so that we can center the zoom 122 // on that mouse position. 123 if (e.getClickCount() == 1 || mousePointInImg == null) { 123 // on that mouse position. 124 // To avoid issues when the user tries to zoom in on the image borders, this point is not calculated 125 // again if there was less than 1.5seconds since the last event. 126 System.out.println(e); 127 if (e.getWhen() - lastTimeForMousePoint > 1500 || mousePointInImg == null) { 128 lastTimeForMousePoint = e.getWhen(); 124 129 mousePointInImg = comp2imgCoord(visibleRect, e.getX(), e.getY()); 125 130 }
Note:
See TracChangeset
for help on using the changeset viewer.