Skip to content

Commit c95afb2

Browse files
committed
Add some notes and write-up for safekeeping before possible restructure
Signed-off-by: Jim Hawkins <[email protected]>
1 parent 5c0084b commit c95afb2

File tree

1 file changed

+62
-13
lines changed

1 file changed

+62
-13
lines changed

documents/Specification/07ZoomBoxMovement/ZoomBoxMovement.md

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,29 @@ Processing steps are as follows.
8484
dimension. Processing is described under
8585
**Zoom Box Movement Root Disappearance Prevention**, below.
8686

87-
The outcome of this step is that the updated root box size and position
88-
values may have been overridden.
87+
These are the possible outcomes of disappearance prevention.
8988

89+
- The root box size and position update resulting from the upward cascade
90+
applies *unchanged*.
91+
- The root box size and position update resulting from the upward cascade
92+
applies with modification, referred to here as an *override*.
93+
- The root box size and position update is *blocked*. That could happen if,
94+
for example, the root box was on the edge of the zooming area.
9095

96+
Note that the override, if there is one, is a replacement size and position.
97+
It isn't a replacement vector.
98+
99+
In the blocked case, no further processing takes place. Otherwise processing
100+
continues to the next step.
91101

92102
5. Check for necessary adjustments to any child boxes that weren't updated in
93103
the upward cascade. Processing is described under
94104
**Zoom Box Movement Downward Cascade**, below.
95105

106+
107+
108+
109+
96110
The conditions for downward cascades are as follows.
97111

98112
- Downward cascade applies to the child boxes of the target box.
@@ -602,32 +616,67 @@ to the child boxes of the cascade parent. In those cascades the child boxes will
602616
be the cascade parents. This is described in the processing steps below.
603617

604618

605-
1. Check if the cascade parent now meets the child deletion conditions. If the
606-
conditions are met then process child deletion now and skip the remaining
607-
steps for this downward cascade.
619+
1. Check whether the cascade parent now meets the child deletion conditions.
608620

609621
Child deletion is described elsewhere in the specification TBD but it could
610622
be [Zoom Box Spawning](../06ZoomBoxSpawning/ZoomBoxSpawning.md). For
611623
convenience, the conditions are that the cascade parent is entirely outside
612624
the zooming area limits.
613625

614-
2. Check the child spawning conditions. If the conditions are met, process
615-
child spawning now and skip the remaining steps for this downward cascade.
616-
617-
Child spawning is described elsewhere in the specification. For
626+
If the conditions are met then process child deletion now and skip the
627+
remaining steps for this downward cascade.
628+
629+
2. Check whether the cascade parent meets the child spawning conditions.
630+
631+
Child spawning is described elsewhere in the specification TBD but it could
632+
be [Zoom Box Spawning](../06ZoomBoxSpawning/ZoomBoxSpawning.md). For
618633
convenience, the conditions are that
619634

620635
- the box has no child boxes.
621636
- all or part of the box is inside the zooming area limits.
622637
- the box's lateral size can be calculated and is above a configured
623638
child spawning threshold.
624639

625-
3.
640+
If the conditions are met, process child spawning now and skip the remaining
641+
steps for this downward cascade.
642+
643+
3. Update the lateral size and front position of each child box. If the cascade
644+
parent has no child boxes then skip this step.
645+
646+
The size of each child box will be determined by weighting and by the size
647+
of the cascade parent.
648+
649+
> Optimise by calculating total weight at child spawning time and
650+
> normalising.
651+
652+
653+
> The front position of each child box will be determined by the solver.
654+
655+
656+
657+
> Set the lateral size of the child box to its child weight multiplied by
658+
> the parent lateral size. Solve the front position of the child box by
659+
> passing the updated lateral size to the function.
660+
661+
> Set the lateral centre of the first child to the lateral centre of the
662+
> parent plus half the parent lateral size. Or set it to the lateral
663+
> centre of the preceding child minus half the lateral size of the
664+
> preceding child.
665+
666+
667+
> Oh dear. Might have to have the root descent check here in addition to
668+
> in the upward cascade. Upward cascade could instead be characterised as
669+
> transferring the move to the root. The root ascent check would still be
670+
> made there.
671+
672+
> Some of these checks would apply to resizing the zooming area.
673+
> Specifically, root ascent and descent, child box deletion, child
674+
> spawning.
675+
626676

627-
3. If the changed box already has child boxes update child box sizes and
628-
positions based on the updated parent size and position.
629677

630-
> Root replacement goes here too.
678+
4. Repeat a downward cascade for each child box. In these cascades the child
679+
box will be the cascade parent.
631680

632681
That completes processing of a downward cascade.
633682

0 commit comments

Comments
 (0)