Add keyboard shortcuts to operations menu tooltips

This commit is contained in:
Ansis Brammanis
2013-02-22 19:27:57 -05:00
parent e1de34c9a7
commit 8a6501998e
2 changed files with 7 additions and 4 deletions
+2 -3
View File
@@ -1573,8 +1573,7 @@ a.success-action {
padding: 5px 0 5px 0;
}
.tooltip .keyhint {
display: block;
.tooltip-inner .keyhint {
color: #222;
font-size: 10px;
padding: 0px 7px;
@@ -1592,7 +1591,7 @@ a.success-action {
display: inline-block;
}
.tooltip .keyhint::after {
.tooltip-inner .keyhint::after {
content: "";
position: absolute;
border-radius: 2px;
+5 -1
View File
@@ -78,7 +78,11 @@ iD.ui.RadialMenu = function(operations) {
.attr('y', (r + 25) * Math.cos(angle) + dy)
.style('display', 'block')
.select('div')
.text(d.description);
.text(d.description + ' ')
.append('span')
.style('position', 'static')
.attr('class', 'keyhint')
.text(d.key.replace('⌫', 'Esc'));
}
function mouseout() {