Fixes comments related to hover-highlighting

This commit is contained in:
Quincy Morgan
2018-10-24 22:27:37 -07:00
parent 81feb1cd99
commit ddb6e1b119
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -2,8 +2,8 @@ import _forEach from 'lodash-es/forEach';
export function highlightEntity(context, entity, highlighted) {
// highlight the member feature in the map while hovering on the list item
var selectorPrefix = entity.type === 'node' ? 'g.' : 'path.';
// set the class for the SVG to add or remove the highlighted styling
context.surface().selectAll(selectorPrefix+entity.id).classed('highlighted', highlighted);
if (entity.members) {
// recursively highlight members so that relations will appear highlighted
+1
View File
@@ -134,6 +134,7 @@ export function uiRawMemberEditor(context) {
.each(function(d) {
if (d.member) {
// highlight the member feature in the map while hovering on the list item
d3_select(this).on('mouseover', function() {
highlightEntity(context, d.member, true);
});
+1
View File
@@ -175,6 +175,7 @@ export function uiRawMembershipEditor(context) {
.attr('class', 'member-row member-row-normal form-field');
enter.each(function(d){
// highlight the relation in the map while hovering on the list item
d3_select(this).on('mouseover', function() {
highlightEntity(context, d.relation, true);
});