mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user