template-carousel-mobile/0017-on.mouse_release
Kartik K. Agaram e38191fc4f aggregate global state inside a 'pane' object
We're soon going to start juggling multiple of these.
2023-11-19 13:15:06 -08:00

14 lines
751 B
Plaintext

on.mouse_release = function(x,y, mouse_button)
if Current_pane.editor_state.scrollbar_drag then
adjust_scrollbar(Current_pane.editor_state, y)
Current_pane.editor_state.scrollbar_drag = nil
elseif on_editor_scrollbar_area(Current_pane.editor_state, x,y) then
adjust_scrollbar(Current_pane.editor_state, y)
elseif x < Current_pane.editor_state.right + 15 - 5 and y < Current_pane.editor_state.bottom + 5 + 10 - 5 then
edit.mouse_release(Current_pane.editor_state, x,y, mouse_button)
elseif Current_pane.output_editor_state.scrollbar_drag then
adjust_scrollbar(Current_pane.output_editor_state, y)
elseif on_editor_scrollbar_area(Current_pane.output_editor_state, x,y) then
adjust_scrollbar(Current_pane.output_editor_state, y)
end
end