Skip to content

Commit

Permalink
Add title text to legend icons
Browse files Browse the repository at this point in the history
Same as alt text minus the word 'icon' as it'd be redundant.
  • Loading branch information
jszwedko committed Jan 28, 2016
1 parent 37d59b5 commit 0a87960
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/assets/javascripts/main.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,22 @@ $(function() {
var icons = {
available: {
name: 'Drains to Sewer',
alt: 'Sewer icon',
title: 'Sewer',
icon: '<%= image_path 'markers/tosewer.png' %>'
},
availableBay: {
name: 'Drains to Ocean/Bay',
alt: 'Sewer to ocean/bay icon',
title: 'Sewer to ocean/bay',
icon: '<%= image_path 'markers/tobay.png' %>'
},
adopted: {
name: 'Adopted',
alt: 'Adopted by other icon',
title: 'Adopted by other',
icon: '<%= image_path 'markers/adopted.png' %>'
},
adopted_by_you: {
name: 'Adopted by you',
alt: 'Adopted by you icon',
title: 'Adopted by you',
icon: '<%= image_path 'markers/adoptedbyyou.png' %>'
}
};
Expand All @@ -106,9 +106,9 @@ $(function() {
var type = icons[key];
var name = type.name;
var icon = type.icon;
var alt = type.alt;
var title = type.title;
var div = document.createElement('div');
div.innerHTML = '<img src="' + icon + '" alt="' + alt + '"> ' + name;
div.innerHTML = '<img src="' + icon + '" alt="' + title + ' icon" title="' + title + '"> ' + name;
legendItems.appendChild(div);
}

Expand Down

0 comments on commit 0a87960

Please sign in to comment.