A container is not drawn, so it had no place in the draw order. The
chain from its content to the parent of the container broke there, and
a container under a character could not be drawn together with it.
- A container gets the switch Sort with parent under Z. It defaults to
off, also for new containers, so projects draw as they did.
- With the switch on, the whole content is drawn in the slot of the
container's parent. The content's own switch does not count there.
- Containers in a row pass the content on as long as each has the
switch on. On the top level or under a tilemap it has no effect.
- drawSlots follows the new sortsWith field of a draw item. Scene view,
game and picking all use drawSlots, so all three agree.
Found on the way: a scene object hung directly under a container
spells the container out, and its template content is dropped. That is
the existing spelledOut rule, the tests now keep both cases apart.
Tests:
- ./check.sh: 178 files, 2573 tests, CHECK EXIT 0
- 7 new unit tests in sort-with-parent.test.ts: the switch, template
content, override per container, a chain, top level and tilemap,
game and picking
- e2e 5b-iii: a real click on the switch in the inspector, with undo
- 4 counter-probes over #242 and #243 bite (2 unit, 2 browser)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>