Skip to content

Pass the course window's height to the embed (steady height) - #31

Merged
cedricvogel-leo merged 1 commit into
mainfrom
feature/window-height
Nov 5, 2026
Merged

cedricvogel-leo merged 1 commit into
mainfrom
feature/window-height

Conversation

@cedricvogel-leo

Copy link
Copy Markdown
Collaborator

Goes with glpython-editor#52: while stepping through a visualization, the block keeps one height, so the course page doesn't move.

  • windowHeight: the macro passes window.innerHeight (the course window's height, which the iframe can't see). The embed caps the visualizer at 80% of it, and a taller step, such as a deep recursion in «Kasten», scrolls inside it.
  • README: a paragraph for course authors after large.

Order and compatibility:

  • Either PR can go first.
  • An embed before #52 ignores the parameter.
  • #52 without this PR uses the screen's height instead.

Going live: a patch version bump for the courses, so the new macro is loaded.

Tested in the LiaScript player (headless Chrome, window 800 px) against a local build of #52's embed, fakultaet(5) with @GLPython.eval(box), 59 steps:

  • with #52, the iframe stays at 878 px at every step;
  • with the current embed, it grows in seven sizes, from 447 to 1089 px.

check-macro passes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cedricvogel-leo
cedricvogel-leo merged commit dca0af0 into main Nov 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant