mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 23:13:42 +00:00
Fix semicombo drag-and-drop issues with stale data and target positioning (re: #7024)
This commit is contained in:
@@ -442,14 +442,15 @@ export function uiFieldCombo(field, context) {
|
||||
.attr('class', 'chip')
|
||||
.classed('draggable', isSemi);
|
||||
|
||||
if (isSemi) { // only semiCombo values are ordered
|
||||
registerDragAndDrop(enter);
|
||||
}
|
||||
|
||||
enter.append('span');
|
||||
enter.append('a');
|
||||
|
||||
chips = chips.merge(enter);
|
||||
chips = chips.merge(enter)
|
||||
.order();
|
||||
|
||||
if (isSemi) { // only semiCombo values are ordered
|
||||
registerDragAndDrop(chips);
|
||||
}
|
||||
|
||||
chips.select('span')
|
||||
.text(function(d) { return d.value; });
|
||||
@@ -521,8 +522,8 @@ export function uiFieldCombo(field, context) {
|
||||
// check the cursor is in the bounding box
|
||||
if (
|
||||
index !== index2 &&
|
||||
d3_event.x < node.offsetLeft + (node.offsetWidth / 2) &&
|
||||
d3_event.x > node.offsetLeft - (node.offsetWidth / 2) &&
|
||||
d3_event.x < node.offsetLeft + node.offsetWidth + 5 &&
|
||||
d3_event.x > node.offsetLeft &&
|
||||
d3_event.y < node.offsetTop + node.offsetHeight &&
|
||||
d3_event.y > node.offsetTop
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user