mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Fix issue where hover-highlighting wouldn't disappear upon removing a relation from a member or a member from a relation (close #5612)
This commit is contained in:
@@ -69,6 +69,10 @@ export function uiRawMemberEditor(context) {
|
||||
|
||||
|
||||
function deleteMember(d) {
|
||||
|
||||
// remove the hover-highlight styling
|
||||
utilHighlightEntities([d.id], false, context);
|
||||
|
||||
context.perform(
|
||||
actionDeleteMember(d.relation.id, d.index),
|
||||
t('operations.delete_member.annotation')
|
||||
@@ -77,8 +81,6 @@ export function uiRawMemberEditor(context) {
|
||||
if (!context.hasEntity(d.relation.id)) {
|
||||
context.enter(modeBrowse(context));
|
||||
}
|
||||
|
||||
utilHighlightEntities([d.id], false, context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +87,9 @@ export function uiRawMembershipEditor(context) {
|
||||
this.blur(); // avoid keeping focus on the button
|
||||
if (d === 0) return; // called on newrow (shoudn't happen)
|
||||
|
||||
// remove the hover-highlight styling
|
||||
utilHighlightEntities([d.relation.id], false, context);
|
||||
|
||||
context.perform(
|
||||
actionDeleteMember(d.relation.id, d.index),
|
||||
t('operations.delete_member.annotation')
|
||||
@@ -184,16 +187,13 @@ export function uiRawMembershipEditor(context) {
|
||||
.append('li')
|
||||
.attr('class', 'member-row member-row-normal form-field');
|
||||
|
||||
itemsEnter.each(function(d){
|
||||
// highlight the relation in the map while hovering on the list item
|
||||
d3_select(this)
|
||||
.on('mouseover', function() {
|
||||
utilHighlightEntities([d.relation.id], true, context);
|
||||
})
|
||||
.on('mouseout', function() {
|
||||
utilHighlightEntities([d.relation.id], false, context);
|
||||
});
|
||||
});
|
||||
// highlight the relation in the map while hovering on the list item
|
||||
itemsEnter.on('mouseover', function(d) {
|
||||
utilHighlightEntities([d.relation.id], true, context);
|
||||
})
|
||||
.on('mouseout', function(d) {
|
||||
utilHighlightEntities([d.relation.id], false, context);
|
||||
});
|
||||
|
||||
var labelEnter = itemsEnter
|
||||
.append('label')
|
||||
|
||||
Reference in New Issue
Block a user