Force visible any entities related to a selected error

(closes #5880)
This commit is contained in:
Bryan Housel
2019-02-10 23:29:23 -05:00
parent 6e45796be7
commit ba44c80076
5 changed files with 106 additions and 71 deletions
+7 -1
View File
@@ -64,6 +64,7 @@ export function uiImproveOsmDetails(context) {
.html(errorDetail);
// If there are entity links in the error message..
var relatedEntities = [];
descriptionEnter.selectAll('.error_entity_link, .error_object_link')
.each(function() {
var link = d3_select(this);
@@ -73,6 +74,8 @@ export function uiImproveOsmDetails(context) {
: this.textContent;
var entity = context.hasEntity(entityID);
relatedEntities.push(entityID);
// Add click handler
link
.on('mouseover', function() {
@@ -116,6 +119,9 @@ export function uiImproveOsmDetails(context) {
}
}
});
// Don't hide entities related to this error - #5880
context.features().forceVisible(relatedEntities);
}
@@ -127,4 +133,4 @@ export function uiImproveOsmDetails(context) {
return improveOsmDetails;
}
}
+6
View File
@@ -66,6 +66,7 @@ export function uiKeepRightDetails(context) {
.html(errorDetail);
// If there are entity links in the error message..
var relatedEntities = [];
descriptionEnter.selectAll('.error_entity_link, .error_object_link')
.each(function() {
var link = d3_select(this);
@@ -75,6 +76,8 @@ export function uiKeepRightDetails(context) {
: this.textContent;
var entity = context.hasEntity(entityID);
relatedEntities.push(entityID);
// Add click handler
link
.on('mouseover', function() {
@@ -118,6 +121,9 @@ export function uiKeepRightDetails(context) {
}
}
});
// Don't hide entities related to this error - #5880
context.features().forceVisible(relatedEntities);
}