mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 14:45:12 +02:00
Revert "Use a temporary area tag for drawing. Fixes #1014"
This reverts commit 4184b503f9.
This commit is contained in:
@@ -110,14 +110,6 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) {
|
||||
};
|
||||
}
|
||||
|
||||
function RemoveTemporaryTag(way) {
|
||||
return function(graph) {
|
||||
var area = graph.entity(wayId);
|
||||
return graph
|
||||
.replace(area.update({tags:_.omit(area.tags, '__area__')}));
|
||||
};
|
||||
}
|
||||
|
||||
// Accept the current position of the temporary node and continue drawing.
|
||||
drawWay.add = function(loc) {
|
||||
var newNode = iD.Node({loc: loc});
|
||||
@@ -171,8 +163,6 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) {
|
||||
|
||||
var way = context.entity(wayId);
|
||||
if (way) {
|
||||
context.perform(
|
||||
RemoveTemporaryTag(way));
|
||||
context.enter(iD.modes.Select(context, [way.id], true));
|
||||
} else {
|
||||
context.enter(iD.modes.Browse(context));
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ _.extend(iD.Way.prototype, {
|
||||
},
|
||||
|
||||
isArea: function() {
|
||||
if (this.tags.area === 'yes' || this.tags.__area__ === 'yes')
|
||||
if (this.tags.area === 'yes')
|
||||
return true;
|
||||
if (!this.isClosed() || this.tags.area === 'no')
|
||||
return false;
|
||||
|
||||
@@ -11,7 +11,7 @@ iD.modes.AddArea = function(context) {
|
||||
.on('start', start)
|
||||
.on('startFromWay', startFromWay)
|
||||
.on('startFromNode', startFromNode),
|
||||
defaultTags = {__area__: 'yes'};
|
||||
defaultTags = {area: 'yes'};
|
||||
|
||||
function start(loc) {
|
||||
var graph = context.graph(),
|
||||
|
||||
Reference in New Issue
Block a user