diff --git a/css/app.css b/css/app.css index 4ec4bd91d..98ba49e57 100644 --- a/css/app.css +++ b/css/app.css @@ -1159,19 +1159,47 @@ a.success-action { border-width: 0 5px 5px; } +.Browse .tooltip { + left: -20px !important; } .Browse .tooltip .tooltip-arrow { - left: 30px; + left: 60px; +} + +.tooltip .keyhint-wrap { + padding: 5px 0 5px 0; } .tooltip .keyhint { - float: right; - background: #eee; + display: block; + color: #222; font-size: 10px; - padding: 0 4px; - background:#aaa; - color:#fff; + padding: 0px 7px; + text-transform: uppercase; + font-weight: bold; + display: inline-block; border-radius: 2px; - margin-left: 4px; + border: 1px solid #CCC; + position: relative; + z-index: 1; + text-align: left; + clear: both; +} + +.tooltip .keyhint .keyhint-label{ + display: inline-block; +} + +.tooltip .keyhint::after { + content: ""; + position: absolute; + border-radius: 2px; + height: 10px; + width: 100%; + z-index: 0; + bottom: -4px; + left: -1px; + border: 1px solid #CCC; + border-top: 0; } .tail { diff --git a/js/id/behavior/drag_midpoint.js b/js/id/behavior/drag_midpoint.js index 72691a512..bd1a40bd9 100644 --- a/js/id/behavior/drag_midpoint.js +++ b/js/id/behavior/drag_midpoint.js @@ -25,7 +25,7 @@ iD.behavior.DragMidpoint = function(mode) { .on('end', function() { history.replace( iD.actions.Noop(), - 'added a node to a way'); + 'Added a node to a way.'); }); return behavior; diff --git a/js/id/behavior/draw_way.js b/js/id/behavior/draw_way.js index 884d72ddb..21c13d2fa 100644 --- a/js/id/behavior/draw_way.js +++ b/js/id/behavior/draw_way.js @@ -4,7 +4,7 @@ iD.behavior.DrawWay = function(wayId, index, mode, baseGraph) { controller = mode.controller, way = mode.history.graph().entity(wayId), finished = false, - annotation = 'added to a way', + annotation = 'Added to a way.', draw = iD.behavior.Draw(map); var node = iD.Node({loc: map.mouseCoordinates()}), @@ -153,7 +153,7 @@ iD.behavior.DrawWay = function(wayId, index, mode, baseGraph) { drawWay.cancel = function() { history.perform( d3.functor(baseGraph), - 'cancelled drawing'); + 'Cancelled drawing.'); finished = true; controller.enter(iD.modes.Browse()); diff --git a/js/id/id.js b/js/id/id.js index ab6dd37f2..69e64e5fe 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -22,7 +22,7 @@ window.iD = function(container) { } function hintprefix(x, y) { - return '' + x + ' ' + y; + return '' + y + '' + '
' + x + '
'; } var m = container.append('div') @@ -44,10 +44,10 @@ window.iD = function(container) { .enter().append('button') .attr('tabindex', -1) .attr('class', function (mode) { return mode.title + ' add-button col3'; }) + .call(bootstrap.tooltip().placement('bottom').html(true)) .attr('data-original-title', function (mode) { return hintprefix(mode.key, mode.description); }) - .call(bootstrap.tooltip().placement('bottom').html(true)) .on('click.editor', function (mode) { controller.enter(mode); }); function disableTooHigh() { @@ -207,12 +207,12 @@ window.iD = function(container) { limiter.select('#undo') .property('disabled', !undo) - .attr('data-original-title', hintprefix('⌘Z', undo)) + .attr('data-original-title', hintprefix('⌘ + Z', undo)) .call(refreshTooltip); limiter.select('#redo') .property('disabled', !redo) - .attr('data-original-title', hintprefix('⌘⇧Z', redo)) + .attr('data-original-title', hintprefix('⌘ + ⇧ + Z', redo)) .call(refreshTooltip); }); diff --git a/js/id/modes/add_point.js b/js/id/modes/add_point.js index 723b1935b..1b9781a9d 100644 --- a/js/id/modes/add_point.js +++ b/js/id/modes/add_point.js @@ -21,7 +21,7 @@ iD.modes.AddPoint = function() { history.perform( iD.actions.AddNode(node), - 'added a point'); + 'Added a point.'); controller.enter(iD.modes.Select(node, true)); } diff --git a/js/id/modes/browse.js b/js/id/modes/browse.js index 9782bac27..ab6bc80cb 100644 --- a/js/id/modes/browse.js +++ b/js/id/modes/browse.js @@ -3,7 +3,7 @@ iD.modes.Browse = function() { button: 'browse', id: 'browse', title: 'Browse', - description: 'Pan and zoom the map', + description: 'Pan and zoom the map.', key: 'b' }; diff --git a/js/id/modes/draw_line.js b/js/id/modes/draw_line.js index 5dee157b3..ae54ab2e1 100644 --- a/js/id/modes/draw_line.js +++ b/js/id/modes/draw_line.js @@ -12,7 +12,7 @@ iD.modes.DrawLine = function(wayId, direction, baseGraph) { headId = (direction === 'forward') ? way.last() : way.first(); behavior = iD.behavior.DrawWay(wayId, index, mode, baseGraph) - .annotation(way.isDegenerate() ? 'started a line' : 'continued a line'); + .annotation(way.isDegenerate() ? 'Started a line.' : 'Continued a line.'); var addNode = behavior.addNode; diff --git a/js/id/modes/move_way.js b/js/id/modes/move_way.js index 1f559da82..18c6ee619 100644 --- a/js/id/modes/move_way.js +++ b/js/id/modes/move_way.js @@ -18,7 +18,7 @@ iD.modes.MoveWay = function(wayId) { history.perform( iD.actions.Noop(), - 'moved a way'); + 'Moved a way.'); function move() { var p = d3.mouse(selection.node()), @@ -29,7 +29,7 @@ iD.modes.MoveWay = function(wayId) { history.replace( iD.actions.MoveWay(wayId, delta, projection), - 'moved a way'); + 'Moved a way.'); } function finish() { diff --git a/js/id/modes/select.js b/js/id/modes/select.js index ad06bda35..1ddd4ffc4 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -14,7 +14,7 @@ iD.modes.Select = function(entity, initial) { if (!_.isEqual(entity.tags, tags)) { mode.history.perform( iD.actions.ChangeEntityTags(d.id, tags), - 'changed tags'); + 'Changed tags.'); } } @@ -114,7 +114,7 @@ iD.modes.Select = function(entity, initial) { history.perform( iD.actions.AddNode(node), iD.actions.AddWayNode(datum.id, node.id, choice.index), - 'added a point to a road'); + 'Added a point to a road.'); d3.event.preventDefault(); d3.event.stopPropagation(); diff --git a/js/id/operations/circularize.js b/js/id/operations/circularize.js index 49956430e..ce161aef4 100644 --- a/js/id/operations/circularize.js +++ b/js/id/operations/circularize.js @@ -10,12 +10,12 @@ iD.operations.Circularize = function(entityId, mode) { if (geometry === 'line') { history.perform( action, - 'made a line circular'); + 'Made a line circular.'); } else if (geometry === 'area') { history.perform( action, - 'made an area circular'); + 'Made an area circular.'); } }; diff --git a/js/id/operations/delete.js b/js/id/operations/delete.js index 03d788261..cc3750360 100644 --- a/js/id/operations/delete.js +++ b/js/id/operations/delete.js @@ -9,22 +9,22 @@ iD.operations.Delete = function(entityId, mode) { if (geometry === 'vertex') { history.perform( iD.actions.DeleteNode(entityId), - 'deleted a vertex'); + 'Deleted a vertex.'); } else if (geometry === 'point') { history.perform( iD.actions.DeleteNode(entityId), - 'deleted a point'); + 'Deleted a point.'); } else if (geometry === 'line') { history.perform( iD.actions.DeleteWay(entityId), - 'deleted a line'); + 'Deleted a line.'); } else if (geometry === 'area') { history.perform( iD.actions.DeleteWay(entityId), - 'deleted an area'); + 'Deleted an area.'); } }; @@ -41,7 +41,7 @@ iD.operations.Delete = function(entityId, mode) { operation.id = "delete"; operation.key = "⌫"; operation.title = "Delete"; - operation.description = "Remove this from the map"; + operation.description = "Remove this from the map."; return operation; }; diff --git a/js/id/operations/reverse.js b/js/id/operations/reverse.js index b36dfd60c..62fd8810b 100644 --- a/js/id/operations/reverse.js +++ b/js/id/operations/reverse.js @@ -4,7 +4,7 @@ iD.operations.Reverse = function(entityId, mode) { var operation = function() { history.perform( iD.actions.ReverseWay(entityId), - 'reversed a line'); + 'Reversed a line.'); }; operation.available = function() { @@ -20,7 +20,7 @@ iD.operations.Reverse = function(entityId, mode) { operation.id = "reverse"; operation.key = "V"; operation.title = "Reverse"; - operation.description = "Make this way go in the opposite direction"; + operation.description = "Make this way go in the opposite direction."; return operation; }; diff --git a/js/id/operations/split.js b/js/id/operations/split.js index 3dcab7481..40aa55fd0 100644 --- a/js/id/operations/split.js +++ b/js/id/operations/split.js @@ -3,7 +3,7 @@ iD.operations.Split = function(entityId, mode) { action = iD.actions.SplitWay(entityId); var operation = function() { - history.perform(action, 'split a way'); + history.perform(action, 'Split a way.'); }; operation.available = function() { @@ -20,7 +20,7 @@ iD.operations.Split = function(entityId, mode) { operation.id = "split"; operation.key = "X"; operation.title = "Split"; - operation.description = "Split this into two ways at this point"; + operation.description = "Split this into two ways at this point."; return operation; }; diff --git a/js/id/operations/unjoin.js b/js/id/operations/unjoin.js index c18de3029..f38333bb4 100644 --- a/js/id/operations/unjoin.js +++ b/js/id/operations/unjoin.js @@ -3,7 +3,7 @@ iD.operations.Unjoin = function(entityId, mode) { action = iD.actions.UnjoinNode(entityId); var operation = function() { - history.perform(action, 'unjoined lines'); + history.perform(action, 'Unjoined lines.'); }; operation.available = function() { @@ -20,7 +20,7 @@ iD.operations.Unjoin = function(entityId, mode) { operation.id = "unjoin"; operation.key = "⇧-J"; operation.title = "Unjoin"; - operation.description = "Disconnect these ways from each other"; + operation.description = "Disconnect these ways from each other."; return operation; };