Skip to content

Commit

Permalink
unimportant
Browse files Browse the repository at this point in the history
  • Loading branch information
capr committed Jul 2, 2024
1 parent 72bb96c commit c66c984
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 15 additions & 3 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@
ui.end_v()
`

dd_items = ['item 1', 'item 2 that is longer than others', 'item 3']
demos.dropdown = `
items = window.items || ['item 1', 'item 2 that is longer than others', 'item 3']
ui.v(1, ui.sp(), 'c', 'c')
ui.h(1, ui.sp())
ui.label('dd1', 'Label of this thing')
ui.state_init('dd1', 'i', 1)
ui.dropdown('dd1', items)
ui.dropdown('dd1', dd_items)
ui.text('', 'or')
ui.dropdown('dd2', items)
ui.dropdown('dd2', dd_items)
ui.text('', 'and something after')
ui.end_h()
ui.end_v()
Expand Down Expand Up @@ -251,6 +251,18 @@
ui.end_h()
`

li_items = []
for (let i = 1; i <= 1000; i++)
li_items.push('Item '+i)
demos.list = `
ui.m(ui.em(20), ui.em(10))
ui.h()
ui.sb('list_sb')
ui.list('list1', li_items)
ui.end_sb()
ui.end_h()
`

// grid

let rows = []
Expand Down
4 changes: 2 additions & 2 deletions www/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ TODO
md
pagenav
info
erors
errors
range-slider
input-group
textarea
Expand Down Expand Up @@ -987,7 +987,7 @@ canvas.addEventListener('pointerleave', function(ev) {

// NOTE: wheelDeltaY is 150 in chrome and 120 if FF. Browser developers...
canvas.addEventListener('wheel', function(ev) {
ui.mouse.wheel_dy = ev.deltaY
ui.mouse.wheel_dy = -ev.deltaY
if (!ui.mouse.wheel_dy)
return
ui.mouse.trackpad = ev.wheelDeltaY === -ev.deltaY * 3
Expand Down

0 comments on commit c66c984

Please sign in to comment.