Commit 3243948
fix(scenegraph): keep m.global's own descendants out of its findNode search
Device-confirmed: a node appended to m.global is found by neither
m.global.findNode() nor m.top.findNode(). findNode's search space is the
subject node's nearest component ancestor; for the global node that is the
Scene, and the global node itself sits outside the Scene's children, so its
own subtree is not in that space. This engine searched the subject's own
subtree first and found it.
Skip that self-search for the global node. Every other node's subtree is
part of its component ancestor's subtree anyway, so searching it first is
only a shortcut and their behavior is unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent e4e24b6 commit 3243948
2 files changed
Lines changed: 26 additions & 2 deletions
File tree
- src/extensions/scenegraph/components
- test/extensions/scenegraph
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1769 | 1769 | | |
1770 | 1770 | | |
1771 | 1771 | | |
1772 | | - | |
1773 | | - | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
1774 | 1780 | | |
1775 | 1781 | | |
1776 | 1782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
| |||
0 commit comments