stop addLine from continuing area's way

This commit is contained in:
Ansis Brammanis
2013-01-14 10:45:54 -05:00
parent 2f1e219d64
commit dc9f7f6a03
+3 -2
View File
@@ -24,10 +24,11 @@ iD.modes.AddLine = function() {
// continue an existing way
var id = datum.id;
var parents = history.graph().parentWays(datum);
if (parents.length && parents[0].nodes[0] === id) {
var isWay = parents.length && parents[0].tags.area !== 'yes';
if (isWay && parents[0].nodes[0] === id ) {
way = parents[0];
direction = 'backward';
} else if (parents.length && _.last(parents[0].nodes) === id) {
} else if (isWay && _.last(parents[0].nodes) === id) {
way = parents[0];
} else {
history.perform(