Fixup after merge

This commit is contained in:
John Firebaugh
2013-05-28 16:56:49 -07:00
parent 1e8052182d
commit 56f8b9e4a9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
iD.actions.MergePolygon = function(ids, newRelationId) {
function groupEntities(graph) {
var entities = ids.map(graph.getEntity);
var entities = ids.map(function (id) { return graph.entity(id); });
return _.extend({
closedWay: [],
multipolygon: [],
+2 -2
View File
@@ -54,7 +54,7 @@ describe("iD.actions.MergePolygon", function () {
graph = iD.actions.MergePolygon(['w0', 'w1'], 'r')(graph);
var r = graph.entity('r');
expect(!!r).to.equal(true);
expect(r.geometry()).to.equal('area');
expect(r.geometry(graph)).to.equal('area');
expect(r.isMultipolygon()).to.equal(true);
expect(r.members.length).to.equal(2);
expect(find(r, 'w0').role).to.equal('outer');
@@ -76,7 +76,7 @@ describe("iD.actions.MergePolygon", function () {
graph = iD.actions.MergePolygon(['r', 'r2'])(graph);
// Delete other relation
expect(graph.entity('r2')).to.equal(undefined);
expect(graph.hasEntity('r2')).to.equal(undefined);
var r = graph.entity('r');
expect(find(r, 'w0').role).to.equal('outer');