Changeset 4494 in josm


Ignore:
Timestamp:
Oct 7, 2011 7:55:45 PM (20 months ago)
Author:
bastiK
Message:

change zoom factor to something more suitable for TMS (2x zoom in increases scale by factor 2)

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java

    r3252 r4494  
    3030    public void actionPerformed(ActionEvent e) { 
    3131        if (!Main.isDisplayingMapView()) return; 
    32         Main.map.mapView.zoomToFactor(0.9); 
     32        Main.map.mapView.zoomToFactor(1/Math.sqrt(2)); 
    3333    } 
    3434 
  • trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java

    r3252 r4494  
    2525    public void actionPerformed(ActionEvent e) { 
    2626        if (!Main.isDisplayingMapView()) return; 
    27         Main.map.mapView.zoomToFactor(1/0.9); 
     27        Main.map.mapView.zoomToFactor(Math.sqrt(2)); 
    2828    } 
    2929 
  • trunk/src/org/openstreetmap/josm/gui/MapMover.java

    r3919 r4494  
    182182     */ 
    183183    public void mouseWheelMoved(MouseWheelEvent e) { 
    184         nc.zoomToFactor(e.getX(), e.getY(), Math.pow(0.8, - e.getWheelRotation())); 
     184        nc.zoomToFactor(e.getX(), e.getY(), Math.pow(Math.sqrt(2), e.getWheelRotation())); 
    185185    } 
    186186 
Note: See TracChangeset for help on using the changeset viewer.