diff --git a/scripts/record-scene.py b/scripts/record-scene.py index eee37791..367c1f63 100644 --- a/scripts/record-scene.py +++ b/scripts/record-scene.py @@ -678,16 +678,113 @@ def overlay_script(badge: str, captions: bool = True) -> str: {{ duration: {int(RIPPLE_SECONDS * 1000)}, easing: 'ease-out' }}).onfinish = () => ring.remove(); }}; // The box round what a line is about, following it if the page moves it, until cleared. + // + // Its label goes where it covers nothing of the page's: tried in turn above + // the box (at its left end, then its right), below it (the same), then + // beside its right edge and its left. A spot is taken only if it is wholly + // on the frame, below the page's sticky header, above the caption bar, out + // of the narrator's corner, off the box, and clear of every line of the + // page's own writing (a card's title above the box is the one it used to + // cover). The writing is looked for cheaply: the elements under a 5 by 3 + // grid of points on the spot, and the rectangles of their own text. When no + // spot is clear, the same spots are tried again letting the label cover the + // boxed thing's own caption and nothing else: its `