Port minor QoL tweaks to other QA services

Use of MouseEnter and MouseLeave is nicer for SVGs since it won't fire
multiple times (shouldn't happen hear anyway as only one element).

Triggering redraw after forcing related elements visible causes them to
render without having to pan manually.
This commit is contained in:
SilentSpike
2019-12-07 19:21:23 +00:00
parent af5b64a477
commit 947f9657db
2 changed files with 8 additions and 6 deletions

View File

@@ -78,11 +78,11 @@ export function uiImproveOsmDetails(context) {
// Add click handler
link
.on('mouseover', function() {
.on('mouseenter', function() {
context.surface().selectAll(utilEntityOrMemberSelector([entityID], context.graph()))
.classed('hover', true);
})
.on('mouseout', function() {
.on('mouseleave', function() {
context.surface().selectAll('.hover')
.classed('hover', false);
})
@@ -122,6 +122,7 @@ export function uiImproveOsmDetails(context) {
// Don't hide entities related to this error - #5880
context.features().forceVisible(relatedEntities);
context.map().pan([0,0]); // trigger a redraw
}
@@ -133,4 +134,4 @@ export function uiImproveOsmDetails(context) {
return improveOsmDetails;
}
}

View File

@@ -80,11 +80,11 @@ export function uiKeepRightDetails(context) {
// Add click handler
link
.on('mouseover', function() {
.on('mouseenter', function() {
context.surface().selectAll(utilEntityOrMemberSelector([entityID], context.graph()))
.classed('hover', true);
})
.on('mouseout', function() {
.on('mouseleave', function() {
context.surface().selectAll('.hover')
.classed('hover', false);
})
@@ -124,6 +124,7 @@ export function uiKeepRightDetails(context) {
// Don't hide entities related to this error - #5880
context.features().forceVisible(relatedEntities);
context.map().pan([0,0]); // trigger a redraw
}
@@ -135,4 +136,4 @@ export function uiKeepRightDetails(context) {
return keepRightDetails;
}
}