feat(ui): ui_scale and ui_box, on-submit, zoom (and a length over a length in calc), on-hold
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3d2a103dfb
commit
ec9a650e65
24 changed files with 323 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# attr_fit.ludic - aspect-ratio (16 / 9, or 1.5) and object-fit (fill, contain, cover, none,
|
||||
# scale-down) for pictures and natives, and a list split at its top-level commas
|
||||
# attr_fit.ludic - aspect-ratio (16 / 9, or 1.5), object-fit (fill, contain, cover, none, scale-down)
|
||||
# for pictures and natives, zoom (zoom.ludic), and a list split at its top-level commas
|
||||
function el_fit_props(n: UiNode, key: string, s: string) -> bool {
|
||||
if key == "aspect-ratio" {
|
||||
let parts = lss_split(s, 47)
|
||||
|
|
@ -12,7 +12,7 @@ function el_fit_props(n: UiNode, key: string, s: string) -> bool {
|
|||
var k = 0
|
||||
if w == "contain" { k = 1 } else if w == "cover" { k = 2 } else if w == "none" { k = 3 } else if w == "scale-down" { k = 4 }
|
||||
nx(n).fit_obj = k
|
||||
} else { return false }
|
||||
} else if key == "zoom" { el_zoom(n, s) } else { return false }
|
||||
return true
|
||||
}
|
||||
# "a, rgba(1, 2, 3, 0.5) 40%, b" -> its three parts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue