Adds highlighting of relation members in the map when hovering on their list item

This commit is contained in:
Quincy Morgan
2018-10-13 18:53:04 -07:00
parent ac341cdf5a
commit cf1b391cf0

View File

@@ -122,6 +122,16 @@ export function uiRawMemberEditor(context) {
enter
.each(function(d) {
if (d.member) {
// highlight the member feature in the map while hovering on the list item
var selectorPrefix = d.type === 'node' ? 'g.' : 'path.';
d3_select(this).on('mouseover', function() {
context.surface().selectAll(selectorPrefix+d.id).classed('related', true);
});
d3_select(this).on('mouseout', function() {
context.surface().selectAll(selectorPrefix+d.id).classed('related', false);
});
var label = d3_select(this).append('label')
.attr('class', 'form-label')
.append('a')
@@ -142,7 +152,7 @@ export function uiRawMemberEditor(context) {
} else {
var incompleteLabel = d3_select(this).append('label')
.attr('class', 'form-label');
incompleteLabel.append('span')
.attr('class', 'member-entity-type')
.text(t('inspector.'+d.type, { id: d.id }));