diff --git a/css/app.css b/css/app.css index 26741c115..aa4c85532 100644 --- a/css/app.css +++ b/css/app.css @@ -292,7 +292,7 @@ input#geocode-location { .commit-section { max-height:250px; - overflow:scroll; + overflow:auto; } /* mobile tweaks */ diff --git a/js/id/actions/modes.js b/js/id/actions/modes.js index f3c5581a0..741d88137 100644 --- a/js/id/actions/modes.js +++ b/js/id/actions/modes.js @@ -8,7 +8,8 @@ iD.modes = {}; iD.modes._node = function(ll) { return iD.Node({ lat: ll[1], - lon: ll[0] + lon: ll[0], + tags: {} }); }; @@ -219,7 +220,7 @@ iD.modes.AddArea = { title: "+ Area", way: function() { return iD.Way({ - tags: { building: 'yes', area: 'yes' } + tags: { building: 'yes', area: 'yes', elastic: 'true' } }); }, enter: function() { @@ -312,6 +313,8 @@ iD.modes.DrawArea = function(way_id) { way.nodes.push(way.nodes[0]); this.map.perform(iD.actions.addWayNode(way, this.map.history.graph().entity(way.nodes[0]))); + delete way.tags.elastic; + this.map.perform(iD.actions.changeTags(way, way.tags)); // End by clicking on own tail return this.exit(); } else { @@ -322,7 +325,8 @@ iD.modes.DrawArea = function(way_id) { node = iD.modes._node(this.map.projection.invert( d3.mouse(surface.node()))); } - way.nodes.pop(); + var old = this.map.history.graph().entity(way.nodes.pop()); + this.map.perform(iD.actions.removeWayNode(way, old)); way.nodes.push(node.id); this.map.perform(iD.actions.addWayNode(way, node)); way.nodes = way.nodes.slice(); diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 42c9bc0a0..9ccd50a2b 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -370,7 +370,7 @@ iD.Map = function(elem, connection) { function selectClick() { var entity = d3.select(d3.event.target).data(); if (entity) entity = entity[0]; - if (!entity || selection === entity.id) return; + if (!entity || selection === entity.id || (entity.tags && entity.tags.elastic)) return; selection = entity.id; d3.select('.inspector-wrap') .style('display', 'block') diff --git a/js/id/ui/commit.js b/js/id/ui/commit.js index db6ce3c9a..44072ab58 100644 --- a/js/id/ui/commit.js +++ b/js/id/ui/commit.js @@ -38,12 +38,14 @@ iD.commit = function() { .attr('placeholder', 'Brief Description'); body.append('button').text('Save') + .attr('class', 'save') .on('click', function() { event.save({ comment: d3.select('textarea.changeset-comment').node().value }); }); body.append('button').text('Cancel') + .attr('class', 'cancel') .on('click', function() { event.cancel(); });