Ignore:
Timestamp:
2010-05-22T00:58:27+02:00 (14 years ago)
Author:
mjulius
Message:

New action: MoveNodeAction
allows to move a node by entering lat and lon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/MoveCommand.java

    r3262 r3266  
    1212import javax.swing.JLabel;
    1313
     14import org.openstreetmap.josm.data.coor.CachedLatLon;
     15import org.openstreetmap.josm.data.coor.EastNorth;
    1416import org.openstreetmap.josm.data.coor.LatLon;
    1517import org.openstreetmap.josm.data.osm.Node;
     
    5557        this(Collections.singleton(osm), x, y);
    5658    }
     59
     60    public MoveCommand(Node node, LatLon position) {
     61        this(Collections.singleton((OsmPrimitive) node), node.getEastNorth().sub(new CachedLatLon(position).getEastNorth()));
     62    }
     63
     64    public MoveCommand(Collection<OsmPrimitive> objects, EastNorth offset) {
     65        this(objects, offset.getX(), offset.getY());
     66    }
     67
    5768    /**
    5869     * Create a MoveCommand and assign the initial object set and movement vector.
Note: See TracChangeset for help on using the changeset viewer.