Commit c79da23
authored
fix(Regions): region overlap detection code (#4270)
If calls to addRegion() came in all at once, we'd end up in a situation
where all overlapping regions moved themselves to avoid each other
(because they were all working with the same list of regions).
This is incorrect, the first region shouldn't move at all. We leverage
the ordering of the `regions` array to ensure that only the later
overlapping regions move.1 parent bf2f42f commit c79da23
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
| 643 | + | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
645 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
646 | 650 | | |
647 | 651 | | |
648 | 652 | | |
649 | 653 | | |
650 | 654 | | |
651 | | - | |
| 655 | + | |
652 | 656 | | |
653 | 657 | | |
654 | 658 | | |
| |||
0 commit comments