From 2aae57d36138ad15d3dbbc814a5b2159f9121ab7 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sat, 28 Feb 2015 22:52:21 -0500 Subject: [PATCH] Save originals of parent entities to localstorage This prevents strange things from happening when a way is moved, (affecting only the childnodes but not the way). --- js/id/core/history.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/id/core/history.js b/js/id/core/history.js index b7b80fa6a..979d815a3 100644 --- a/js/id/core/history.js +++ b/js/id/core/history.js @@ -199,6 +199,12 @@ iD.History = function(context) { if (id in base.graph.entities) { baseEntities[id] = base.graph.entities[id]; } + // get originals of parent entities too + _.forEach(base.graph._parentWays[id], function(parentId) { + if (parentId in base.graph.entities) { + baseEntities[parentId] = base.graph.entities[parentId]; + } + }); }); var x = {};