Changeset 15041 in josm for trunk/src/org/openstreetmap/josm/gui/MapView.java
- Timestamp:
- 2019-05-03T15:27:07+02:00 (7 years ago)
- File:
-
- 1 edited
-
trunk/src/org/openstreetmap/josm/gui/MapView.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r14607 r15041 684 684 } 685 685 686 if (getCenter() == null) 686 EastNorth oldCenter = getCenter(); 687 if (oldCenter == null) 687 688 return false; // no data loaded yet. 688 689 … … 691 692 Point l1 = getLocationOnScreen(); 692 693 final EastNorth newCenter = new EastNorth( 693 getCenter().getX()+ (l1.x-oldLoc.x - (oldSize.width-getWidth())/2.0)*getScale(),694 getCenter().getY()+ (oldLoc.y-l1.y + (oldSize.height-getHeight())/2.0)*getScale()694 oldCenter.getX()+ (l1.x-oldLoc.x - (oldSize.width-getWidth())/2.0)*getScale(), 695 oldCenter.getY()+ (oldLoc.y-l1.y + (oldSize.height-getHeight())/2.0)*getScale() 695 696 ); 696 697 oldLoc = null; oldSize = null;
Note:
See TracChangeset
for help on using the changeset viewer.
