mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fix circularize with > 12 vertices (fixes #1054)
This commit is contained in:
@@ -42,7 +42,8 @@ iD.actions.Circularize = function(wayId, projection, count) {
|
||||
}
|
||||
|
||||
ids.push(ids[0]);
|
||||
graph = graph.replace(way.update({nodes: ids}));
|
||||
way = way.update({nodes: ids});
|
||||
graph = graph.replace(way);
|
||||
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
graph.parentWays(nodes[i]).forEach(function(parent) {
|
||||
|
||||
@@ -49,7 +49,8 @@ describe("iD.actions.Circularize", function () {
|
||||
'b': iD.Node({id: 'b', loc: [2, 0]}),
|
||||
'c': iD.Node({id: 'c', loc: [2, 2]}),
|
||||
'd': iD.Node({id: 'd', loc: [0, 2]}),
|
||||
'-': iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'a']}),
|
||||
'e': iD.Node({id: 'e', loc: [1, 1]}),
|
||||
'-': iD.Way({id: '-', nodes: ['a', 'b', 'c', 'd', 'e', 'a']}),
|
||||
'=': iD.Way({id: '=', nodes: ['d']})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user