mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
Co-authored-by: Lingxuan Ye <yelingxuan@xiaomi.com> Co-authored-by: sxyazi <sxyazi@gmail.com>
33 lines
676 B
Lua
33 lines
676 B
Lua
Markers = {
|
|
_id = "markers",
|
|
}
|
|
|
|
function Markers:new(chunks, tab)
|
|
local me = setmetatable({ _chunks = chunks, _tab = tab }, { __index = self })
|
|
me:build()
|
|
return me
|
|
end
|
|
|
|
function Markers:build()
|
|
self._children = {
|
|
Marker:new(self._chunks[1], self._tab.parent),
|
|
Marker:new(self._chunks[2], self._tab.current),
|
|
}
|
|
end
|
|
|
|
function Markers:reflow() return {} end
|
|
|
|
function Markers:redraw()
|
|
local elements = {}
|
|
for _, child in ipairs(self._children) do
|
|
elements = ya.list_merge(elements, ui.redraw(child))
|
|
end
|
|
return elements
|
|
end
|
|
|
|
-- Mouse events
|
|
function Markers:click(event, up) end
|
|
|
|
function Markers:scroll(event, step) end
|
|
|
|
function Markers:touch(event, step) end
|