Revert "Difference only changed entities"

This reverts commit 74d006ea08.

Conflicts:

	js/id/graph/graph.js
This commit is contained in:
Ansis Brammanis
2013-01-25 18:05:38 -05:00
parent 5645a48feb
commit db0ba2c88c
2 changed files with 3 additions and 13 deletions
+3 -12
View File
@@ -157,12 +157,9 @@ iD.Graph.prototype = {
},
difference: function (graph) {
var result = [],
keys = Object.keys(this.entities),
entity, oldentity, id, i;
var result = [], entity, oldentity, id;
for (i = 0; i < keys.length; i++) {
id = keys[i];
for (id in this.entities) {
entity = this.entities[id];
oldentity = graph.entities[id];
if (entity !== oldentity) {
@@ -184,9 +181,7 @@ iD.Graph.prototype = {
}
}
keys = Object.keys(graph.entities);
for (i = 0; i < keys.length; i++) {
id = keys[i];
for (id in graph.entities) {
entity = graph.entities[id];
if (entity && !this.entities.hasOwnProperty(id)) {
result.push(id);
@@ -219,9 +214,5 @@ iD.Graph.prototype = {
if (!entity) result.push(id);
});
return result;
},
reset: function() {
iD.Graph.prototype.original = {};
}
};
-1
View File
@@ -127,7 +127,6 @@ iD.History = function() {
},
reset: function () {
iD.Graph.prototype.reset();
stack = [{graph: iD.Graph()}];
index = 0;
dispatch.change();