Add a tooltip to the plus button in the "All relations" section (re: #3812)

This commit is contained in:
Quincy Morgan
2019-04-07 14:05:31 -07:00
parent 9d029a37a8
commit eafd2cec3e
3 changed files with 10 additions and 3 deletions
+1
View File
@@ -474,6 +474,7 @@ en:
all_tags: All tags
all_members: All members
all_relations: All relations
add_to_relation: Add to a relation
new_relation: New relation...
choose_relation: Choose a parent relation
role: Role
+1
View File
@@ -584,6 +584,7 @@
"all_tags": "All tags",
"all_members": "All members",
"all_relations": "All relations",
"add_to_relation": "Add to a relation",
"new_relation": "New relation...",
"choose_relation": "Choose a parent relation",
"role": "Role",
+8 -3
View File
@@ -3,7 +3,7 @@ import {
select as d3_select
} from 'd3-selection';
import { t } from '../util/locale';
import { t, textDirection } from '../util/locale';
import {
actionAddEntity,
@@ -17,6 +17,7 @@ import { osmEntity, osmRelation } from '../osm';
import { services } from '../services';
import { svgIcon } from '../svg';
import { uiCombobox, uiDisclosure } from './index';
import { tooltip } from '../util/tooltip';
import { utilArrayGroupBy, utilDisplayName, utilNoAuto, utilHighlightEntities } from '../util';
@@ -308,10 +309,14 @@ export function uiRawMembershipEditor(context) {
.append('div')
.attr('class', 'add-row');
addRowEnter
var addRelationButton = addRowEnter
.append('button')
.attr('class', 'add-relation')
.attr('class', 'add-relation');
addRelationButton
.call(svgIcon('#iD-icon-plus', 'light'));
addRelationButton
.call(tooltip().title(t('inspector.add_to_relation')).placement(textDirection === 'ltr' ? 'right' : 'left'));
addRowEnter
.append('div')