Entire notice is clickable. Fixes #262

This commit is contained in:
Tom MacWright
2013-01-31 10:03:43 -05:00
parent 208ed6a2ed
commit edb3a3b682
2 changed files with 21 additions and 16 deletions

View File

@@ -1052,7 +1052,8 @@ a.success-action {
text-align:center;
}
.notice .notice-inner {
.notice .zoom-to {
width:100%;
height: 40px;
border-radius: 5px;
line-height: 40px;
@@ -1061,12 +1062,19 @@ a.success-action {
opacity: 0.9;
}
.notice .notice-inner .zoom-to {
width:40px;
height:40px;
.notice .zoom-to:hover {
background: #bde5aa;
}
.notice .zoom-to .icon {
margin-top:10px;
margin-right:10px;
}
.icon.zoom-in-invert {
background-position: -240px -40px;
}
/* Tooltips
------------------------------------------------------- */

View File

@@ -4,20 +4,17 @@ iD.ui.notice = function(selection) {
notice = {};
var div = selection.append('div')
.attr('class', 'notice')
.append('div')
.attr('class', 'notice-inner');
.attr('class', 'notice');
div.append('button')
.attr('class', 'zoom-to')
.on('click', function() {
event.zoom();
})
.append('span')
.attr('class', 'icon invert zoom-in');
var button = div.append('button')
.attr('class', 'zoom-to notice')
.on('click', event.zoom);
div.append('span')
.attr('class', 'notice-text')
button.append('span')
.attr('class', 'icon zoom-in-invert');
button.append('span')
.attr('class', 'label')
.text(t('zoom_in_edit'));
notice.message = function(_) {