From e20a35d7c9b498ae92c018c54e883f7f850e97c7 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 14 Dec 2012 14:51:05 -0500 Subject: [PATCH 1/5] Append notice to supersurface. Fixes #266 --- css/app.css | 2 +- js/id/renderer/map.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/css/app.css b/css/app.css index db2eed63c..4a032954d 100644 --- a/css/app.css +++ b/css/app.css @@ -685,7 +685,7 @@ div.typeahead a:first-child { .notice { position:absolute; - top:60px; + top:0px; left:70px; width:250px; height:50px; diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index af99cc057..5d03236ed 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -56,7 +56,7 @@ iD.Map = function() { alength = arrow.node().getComputedTextLength(); arrow.remove(); - notice = iD.notice(d3.select('body') + notice = iD.notice(supersurface .append('div') .attr('class', 'notice')); From 9887e9c1bf6368d2aca82bf5926b84e56f5d5b3d Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 14 Dec 2012 14:51:26 -0500 Subject: [PATCH 2/5] Fix global leaks --- js/id/ui/inspector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index b8c834cc8..23c9c0f39 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -106,13 +106,13 @@ iD.Inspector = function() { .on('keydown.push-more', pushMore) .each(bindTypeahead); - removeBtn = row.append('button') + var removeBtn = row.append('button') .attr('class','remove minor') .on('click', removeTag); removeBtn.append('span').attr('class', 'icon remove'); - helpBtn = row.append('button').attr('class', 'tag-help minor').append('a') + var helpBtn = row.append('button').attr('class', 'tag-help minor').append('a') .attr('target', '_blank') .attr('tabindex', -1) .attr('href', function(d) { From 97637c0cf539e63200f9ce8dc80e17063ae31ff2 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 14 Dec 2012 14:55:31 -0500 Subject: [PATCH 3/5] Fix saving empty tag from inspector --- js/id/ui/inspector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 23c9c0f39..385f91d02 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -124,7 +124,7 @@ iD.Inspector = function() { function grabtags() { var grabbed = []; - function grab(d) { grabbed.push(d); } + function grab(d) { if (d.key !== '') grabbed.push(d); } inspectorwrap.selectAll('li').each(grab); return grabbed; } From 24b6e8adb232737911e6f7836d1e0534b0ed962e Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 14 Dec 2012 15:04:54 -0500 Subject: [PATCH 4/5] Just an area tag. Fixes #282 --- js/id/modes/add_area.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/modes/add_area.js b/js/id/modes/add_area.js index ae19f193d..33facb041 100644 --- a/js/id/modes/add_area.js +++ b/js/id/modes/add_area.js @@ -16,7 +16,7 @@ iD.modes.AddArea = function() { map.surface.on('click.addarea', function() { var datum = d3.select(d3.event.target).datum() || {}, - way = iD.Way({tags: { building: 'yes', area: 'yes' }}); + way = iD.Way({tags: { area: 'yes' }}); if (datum.type === 'node') { // start from an existing node From 94c7e17b8152a49c54045123a6f3d76edb51d1a9 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Fri, 14 Dec 2012 15:34:21 -0500 Subject: [PATCH 5/5] Fix tabindex --- js/id/ui/inspector.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index 385f91d02..741138a3c 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -107,17 +107,21 @@ iD.Inspector = function() { .each(bindTypeahead); var removeBtn = row.append('button') + .attr('tabindex', -1) .attr('class','remove minor') .on('click', removeTag); removeBtn.append('span').attr('class', 'icon remove'); - var helpBtn = row.append('button').attr('class', 'tag-help minor').append('a') - .attr('target', '_blank') + var helpBtn = row.append('button') .attr('tabindex', -1) - .attr('href', function(d) { - return 'http://taginfo.openstreetmap.org/keys/' + d.key; - }); + .attr('class', 'tag-help minor') + .append('a') + .attr('tabindex', -1) + .attr('target', '_blank') + .attr('href', function(d) { + return 'http://taginfo.openstreetmap.org/keys/' + d.key; + }); helpBtn.append('span').attr('class', 'icon inspect'); }