From c4e88ad8e9c3efe3bc6cb5c4fcac2faf59fb7c79 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 8 Jan 2013 11:56:40 -0500 Subject: [PATCH] Add more explanatory helptext --- js/id/id.js | 8 ++++++-- js/id/ui/geocoder.js | 3 ++- js/id/ui/layerswitcher.js | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/id/id.js b/js/id/id.js index 58232fba4..bde313093 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -174,8 +174,11 @@ window.iD = function(container) { var zoom = container.append('div') .attr('class', 'zoombuttons map-control') .selectAll('button') - .data([['zoom-in', '+', map.zoomIn], ['zoom-out', '-', map.zoomOut]]) - .enter().append('button').attr('class', function(d) { return d[0] + ' narrow'; }) + .data([['zoom-in', '+', map.zoomIn, 'Zoom In'], ['zoom-out', '-', map.zoomOut, 'Zoom Out']]) + .enter() + .append('button') + .attr('class', function(d) { return d[0] + ' narrow'; }) + .attr('title', function(d) { return d[3]; }) .on('click', function(d) { return d[2](); }) .append('span') .attr('class', function(d) { @@ -191,6 +194,7 @@ window.iD = function(container) { .attr('class', 'geolocate-control map-control') .append('button') .attr('class', 'narrow') + .attr('title', 'Show My Location') .text('G') .on('click', function() { navigator.geolocation.getCurrentPosition(geolocateSuccess, geolocateError); diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index 1f11f3e11..a744f92b2 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -35,7 +35,8 @@ iD.geocoder = function() { } var button = selection.append('button') - .attr('class','narrow') + .attr('class', 'narrow') + .attr('title', 'Find A Location') .html('') .on('click', toggle); diff --git a/js/id/ui/layerswitcher.js b/js/id/ui/layerswitcher.js index 94d4956d9..fd0a78485 100644 --- a/js/id/ui/layerswitcher.js +++ b/js/id/ui/layerswitcher.js @@ -31,6 +31,7 @@ iD.layerswitcher = function(map) { var button = selection .append('button') .attr('class', 'narrow') + .attr('title', 'Layer Settings') .html("") .on('click.layerswitcher-toggle', toggle);