Mutual anchor condition fixed
This commit is contained in:
parent
1aedcd5ac4
commit
42707b3589
|
@ -306,10 +306,19 @@ function pickTopPropertyRecord(property) {
|
|||
if(!(anchoredMachineId in candidates))
|
||||
continue;
|
||||
|
||||
const candidateMachineIndex = candidates[anchoredMachineId].machineIndex;
|
||||
const ourAnchor = prop.anchors[anchoredMachineId];
|
||||
const candidateRecord = candidates[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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue