Compare commits
No commits in common. "master" and "v3" have entirely different histories.
1 changed files with 2 additions and 7 deletions
9
init.lua
9
init.lua
|
|
@ -752,7 +752,6 @@ local fs_scrollbar = {
|
|||
return e
|
||||
end,
|
||||
onchange = function(e, fn)
|
||||
e._has_onchange = true
|
||||
ctx._events.on_scrollbar_event[e.__id] = fn
|
||||
return e
|
||||
end,
|
||||
|
|
@ -806,11 +805,9 @@ local fs_scroll_container = {
|
|||
end
|
||||
out[#out +1] = "scroll_container_end[]"
|
||||
|
||||
local v = e.__fs._ctx.fields[e.__id]
|
||||
if not e._scrollbar then
|
||||
local v = e.__fs._ctx.fields[e.__id]
|
||||
out[#out +1] = string.format("scrollbar[-800,-800;0,0;%s;%s;%s]", get(e, "orientation"), e.__id, v and v:sub(5) or "")
|
||||
elseif not e._scrollbar._has_onchange and v then
|
||||
e._scrollbar.value = v:sub(5)
|
||||
end
|
||||
|
||||
return table.concat(out)
|
||||
|
|
@ -846,8 +843,7 @@ local fs_scroll_container = {
|
|||
e._scrollbar:onchange(fn)
|
||||
return e
|
||||
end
|
||||
e._scrollbar = fs_scrollbar(-800, -800, 0, 0, e._orientation):onchange(fn)
|
||||
e._scrollbar.__id = e.__id
|
||||
e._scrollbar = fs_scrollbar(-800, -800, 0, 0, e._orientation, e.__id):onchange(fn)
|
||||
return e
|
||||
end,
|
||||
-- A non-transient name is required in order to preserve scroll position upon a rebuild.
|
||||
|
|
@ -1483,7 +1479,6 @@ imfs = {
|
|||
local container = {__parent = ctx, _events = setmetatable({}, {__index = ctx._events, __newindex = ctx._events}), __fs = ctx.__fs or ctx}
|
||||
table.insert(ctx, container)
|
||||
ctx = container
|
||||
return container
|
||||
end,
|
||||
container_end = function()
|
||||
ctx = ctx.__parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue