From cf2e111fcb16c54214bffed12b10ab3deb52e19f Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Wed, 20 Mar 2013 17:46:22 -0400 Subject: [PATCH] add preset icon to back button, and fix margins --- css/app.css | 27 +++++++++++++++++++-------- js/id/ui/tag_editor.js | 15 ++++++--------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/css/app.css b/css/app.css index 058788af9..25ba70bcf 100644 --- a/css/app.css +++ b/css/app.css @@ -654,17 +654,25 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} height: 100%; border-radius: 0; border-right: 1px solid #CCC; - width: 12.5%; + width: 25%; text-align: center; overflow: hidden; } -.inspector-wrap .message div.fl .icon{ - margin-top: 18px; +.inspector-wrap .message button.fl.line .icon.back { + margin-top: 20px; } -.inspector-wrap .message div.fl.line .icon{ - margin-left: -25px; - margin-top: -23px; + +.inspector-wrap .message button.fl.vertex .icon.back, +.inspector-wrap .message button.fl.point .icon.back, +.inspector-wrap .message button.fl.area .icon.back { + margin-top: 2px; +} + +.inspector-wrap .message button.fl.vertex .preset-icon, +.inspector-wrap .message button.fl.point .preset-icon, +.inspector-wrap .message button.fl.area .preset-icon { + margin: 0 20px; } .inspector-wrap .message button.fr { @@ -676,6 +684,7 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} .inspector-wrap .message h3 { display: block; + font-size: 16px; line-height: 20px; } @@ -754,8 +763,10 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} margin: auto; } -.inspector-body-line .grid-entry .icon { - top: -10px; +.inspector-body-line .grid-entry > .icon { + top: 10px; + left: -10px; + right: -10px; } .grid-entry .label { diff --git a/js/id/ui/tag_editor.js b/js/id/ui/tag_editor.js index ccf903ab9..b26be77f2 100644 --- a/js/id/ui/tag_editor.js +++ b/js/id/ui/tag_editor.js @@ -29,18 +29,15 @@ iD.ui.TagEditor = function(context, entity) { var messagewrap = selection.append('div') .attr('class', 'message fillL'); - messagewrap.append('button') - .attr('class', 'preset-reset fl') + var back = messagewrap.append('button') + .attr('class', 'preset-reset fl ' + geometry) .on('click', function() { event.choose(preset); - }) - .append('span') + }); + back.append('span') .attr('class', 'icon back'); - - messagewrap.append('div') - .attr('class', 'preset-reset fl ' + geometry) - .append('span') - .attr('class', 'icon' + (preset ? ' feature-' + (preset.icon || 'marker-stroked') : '')); + back.append('span') + .attr('class', 'preset-icon icon' + (preset ? ' feature-' + (preset.icon || 'marker-stroked') : '')); messagewrap.append('h3') .attr('class', 'inspector-inner fl')