diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 8a30ea527..8c12a2f52 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -119,13 +119,6 @@ iD.Map = function(context) { } return true; - } else if (d.type === 'node') { - // if a node was deleted, only the way will be in the diff - // so we should redraw midpoints for all nodes in that way - var parentWays = graph.parentWays({ id: d.id }); - if (parentWays.length > 0 && parentWays[0].id in complete) return true; - - return d.id in complete; } else { return d.id in complete; } diff --git a/js/id/svg/midpoints.js b/js/id/svg/midpoints.js index 55a069172..d11bdc040 100644 --- a/js/id/svg/midpoints.js +++ b/js/id/svg/midpoints.js @@ -17,8 +17,12 @@ iD.svg.Midpoints = function(projection, context) { b = nodes[j + 1], id = [a.id, b.id].sort().join('-'); - // If neither of the nodes changed, no need to redraw midpoint - if (!midpoints[id] && (filter(a) || filter(b))) { + // Redraw midpoints in two cases: + // 1. One of the two endpoint nodes changed (e.g. was moved). + // 2. A node was deleted. The midpoint between the two new + // endpoints needs to be redrawn. In this case only the + // way will be in the diff. + if (!midpoints[id] && (filter(a) || filter(b) || filter(entity))) { var loc = iD.geo.interp(a.loc, b.loc, 0.5); if (extent.intersects(loc) && iD.geo.euclideanDistance(projection(a.loc), projection(b.loc)) > 40) { midpoints[id] = {