Skip to content

Commit

Permalink
Use temp names for temp segments
Browse files Browse the repository at this point in the history
(closes #1369)
  • Loading branch information
bhousel committed Jan 13, 2017
1 parent cb35873 commit fd9b393
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/behavior/draw_way.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,19 @@ export function behaviorDrawWay(context, wayId, index, mode, baseGraph) {
'operations.start.annotation.' :
'operations.continue.annotation.') + context.geometry(wayId)),
draw = behaviorDraw(context),
end = osmNode({ loc: context.map().mouseCoordinates() }),
startIndex, start, segment;
startIndex, start, end, segment;


if (!isArea) {
startIndex = typeof index === 'undefined' ? way.nodes.length - 1 : 0;
start = osmNode({ loc: context.entity(way.nodes[startIndex]).loc });
segment = osmWay({
start = osmNode({ id: 'nStart', loc: context.entity(way.nodes[startIndex]).loc });
end = osmNode({ id: 'nEnd', loc: context.map().mouseCoordinates() });
segment = osmWay({ id: 'wTemp',
nodes: typeof index === 'undefined' ? [start.id, end.id] : [end.id, start.id],
tags: _.clone(way.tags)
});
} else {
end = osmNode({ loc: context.map().mouseCoordinates() });
}


Expand Down

0 comments on commit fd9b393

Please sign in to comment.