Mutual anchor condition fixed
This commit is contained in:
parent
1aedcd5ac4
commit
42707b3589
|
@ -306,10 +306,19 @@ function pickTopPropertyRecord(property) {
|
||||||
if(!(anchoredMachineId in candidates))
|
if(!(anchoredMachineId in candidates))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const candidateMachineIndex = candidates[anchoredMachineId].machineIndex;
|
const candidateRecord = candidates[anchoredMachineId];
|
||||||
const ourAnchor = prop.anchors[anchoredMachineId];
|
|
||||||
|
|
||||||
if(candidateMachineIndex <= ourAnchor) {
|
const candidateMachineIndex = candidateRecord.machineIndex;
|
||||||
|
const ourAnchorIndex = prop.anchors[anchoredMachineId];
|
||||||
|
|
||||||
|
if(candidateMachineIndex === ourAnchorIndex && prop.machineId in candidateRecord.anchors) {
|
||||||
|
if(prop.machineIndex === candidateRecord.anchors[prop.machineId]) {
|
||||||
|
//mutual anchor condition. Shouldn't be possible and yet here we are!
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(candidateMachineIndex <= ourAnchorIndex) {
|
||||||
delete candidates[anchoredMachineId];
|
delete candidates[anchoredMachineId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue