It will also be much faster to fetch the remote entities in batches
rather than one at a time through LoadEntity.
One bonus/hazard with Multi Fetch GET is that it will get deleted entities
with `visible=false`, rather than returning a HTTP Status Code 410 (Gone).
This will be the only way that we can really do proper undeletion
(Incrementing the current version by 1 is not guaranteed to work. And
if a way is moved, fetching way/full will tell us whether the childnodes
are part of the way, but not necessarily whether they exist or not.)
We must be careful never to merge deleted entities into the real graph.
e.g, a deleted node will not have a 'loc' attribute, so code that assumes
every node must have a `loc` will be broken.
So because deleted entities are very special, the output from `loadMultiple`
should only be used for conflict resolution for now.
(instead of dispatching `load` event to merge them into `history`)
This is cleaner becuase now `context` doesn't need to keep an
`altGraph` state used only for Conflict Resolution.
The conflict resolution code calls the `iD.Connection` methods directly,
and other places in the code call `loadEntity` and `loadTiles` wrappers
that merge the entities into the main history.
* don't worry about deep copying, because immutability
* don't need `attrs` parameter which is usually empty
* don't worry about resetting `v` entity version
This makes sure that the originals of changed entities get merged
into the base of the stack after restoring the data from JSON.
This is necessary, because the stack will only have elements for
the current viewport after a restart and previously *modified*
objects will now be falsely detected as *created* ones.
Also removed some ineffective code.
when an action (e.g. moving a way) caused multiple child elements
of the same parent to be changed, their parent was also loaded into
the tree multiple times during `tree.intersects()`.
this fixes#1978
The main problem with the existing logic was that it
did not update the extents of relations when previously incomplete members were loaded.
It was also overly stateful; the various queues and flags
are no longer required.
Fixes#1928.
Fixes#1540.
We can't rely on identity equality here due to how
restoring works, and don't want to anyway -- the summary
should ignore net-no-op tag changes.
Fixes#1915.