From db0ba2c88c237e158bf2ccd522c7847f36f47ef2 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 25 Jan 2013 18:05:38 -0500 Subject: [PATCH] Revert "Difference only changed entities" This reverts commit 74d006ea08f49734e62b57dd2aa7fac4ef090afa. Conflicts: js/id/graph/graph.js --- js/id/graph/graph.js | 15 +++------------ js/id/graph/history.js | 1 - 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/js/id/graph/graph.js b/js/id/graph/graph.js index 0ca40b3a2..bc152270b 100644 --- a/js/id/graph/graph.js +++ b/js/id/graph/graph.js @@ -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 = {}; } }; diff --git a/js/id/graph/history.js b/js/id/graph/history.js index 5fcb41825..87d637c54 100644 --- a/js/id/graph/history.js +++ b/js/id/graph/history.js @@ -127,7 +127,6 @@ iD.History = function() { }, reset: function () { - iD.Graph.prototype.reset(); stack = [{graph: iD.Graph()}]; index = 0; dispatch.change();