feat(ui): scroll-top holds a scroll box at an offset, on-scroll, and ui_scroll_set
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cf8b9e425e
commit
abf45ef9db
10 changed files with 85 additions and 1 deletions
3
examples/library/ui_scroll_hold_parts/Held.lss
Normal file
3
examples/library/ui_scroll_hold_parts/Held.lss
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.page { width: 400px; gap: 4px }
|
||||
.list { overflow: auto; width: 200px; height: 100px }
|
||||
p { height: 40px }
|
||||
5
examples/library/ui_scroll_hold_parts/Held.ludic
Normal file
5
examples/library/ui_scroll_hold_parts/Held.ludic
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Held.ludic - three scroll boxes: one held at its state's offset and told when it moves, one held
|
||||
# at a fixed offset, and one the program moves once
|
||||
component Held {
|
||||
state top: float = 120.0
|
||||
}
|
||||
6
examples/library/ui_scroll_hold_parts/Held.xml
Normal file
6
examples/library/ui_scroll_hold_parts/Held.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<div class="page">
|
||||
<div class="list" id="log" scroll-top="{top}" on-scroll="set top = event.value"><each in="{range(10)}" as="r"><p>{r}</p></each></div>
|
||||
<div class="list" id="fixed" scroll-top="50"><each in="{range(10)}" as="r"><p>{r}</p></each></div>
|
||||
<div class="list" id="free"><each in="{range(10)}" as="r"><p>{r}</p></each></div>
|
||||
<p>top {top}</p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue