mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Prior art
This commit is contained in:
@@ -80,3 +80,27 @@ which refer to elements, so we want to have real references of those
|
||||
elements, but we don't have the data yet. Thus when the Connection
|
||||
encounters a new object but has a non-loaded representation of it,
|
||||
the non-loaded version is replaced.
|
||||
|
||||
## Prior Art
|
||||
|
||||
JOSM and Potlatch 2 appear to implement versioning in the same way, but having
|
||||
an undo stack:
|
||||
|
||||
```java
|
||||
// src/org/openstreetmap/josm/actions/MoveNodeAction.java
|
||||
Main.main.undoRedo.add(new MoveCommand(n, coordinates));
|
||||
|
||||
// src/org/openstreetmap/josm/command/MoveCommand.java
|
||||
|
||||
/**
|
||||
* List of all old states of the objects.
|
||||
*/
|
||||
private List<OldState> oldState = new LinkedList<OldState>();
|
||||
|
||||
@Override public boolean executeCommand() {
|
||||
// ...
|
||||
}
|
||||
@Override public void undoCommand() {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@@ -8,7 +8,6 @@ iD.Node = function(id, lat, lon, tags, loaded) {
|
||||
};
|
||||
|
||||
iD.Node.prototype = {
|
||||
|
||||
type: 'node',
|
||||
|
||||
intersects: function(extent) {
|
||||
@@ -17,5 +16,4 @@ iD.Node.prototype = {
|
||||
(this.lat <= extent[0][1]) &&
|
||||
(this.lat >= extent[1][1]);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -11,5 +11,3 @@ iD.Relation.prototype = {
|
||||
|
||||
intersects: function() { return true; }
|
||||
};
|
||||
|
||||
// iD.Util.extend(iD.Relation, iD.Entity);
|
||||
|
||||
Reference in New Issue
Block a user