mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Fixup after merge
This commit is contained in:
@@ -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: [],
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user