2023-01-26 04:11:22 +00:00
|
|
|
on.update = function(dt)
|
2023-11-27 06:55:54 +00:00
|
|
|
refresh_debug_animations()
|
2023-01-26 04:11:22 +00:00
|
|
|
if Animating then
|
|
|
|
animate_next(dt)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
if Pan then
|
|
|
|
set_mouse_cursor('hand')
|
|
|
|
elseif Move or on_handle(App.mouse_x(), App.mouse_y()) then
|
|
|
|
set_mouse_cursor('crosshair')
|
|
|
|
else
|
|
|
|
set_mouse_cursor('arrow')
|
|
|
|
end
|
|
|
|
if Pan then
|
2023-02-19 04:52:12 +00:00
|
|
|
Viewport.x = Pan.x - App.mouse_x()/Viewport.zoom
|
|
|
|
Viewport.y = Pan.y - App.mouse_y()/Viewport.zoom
|
2023-01-26 04:11:22 +00:00
|
|
|
B()
|
|
|
|
return
|
|
|
|
end
|
|
|
|
if Move then
|
|
|
|
Move.node.x = sx(App.mouse_x()-Move.xoff)
|
|
|
|
Move.node.y = sy(App.mouse_y()-Move.yoff)
|
2023-11-12 17:49:25 +00:00
|
|
|
-- quantize the x axis to discrete columns
|
|
|
|
Move.node.x = round(Move.node.x/100)*100
|
2023-04-18 09:10:18 +01:00
|
|
|
A1(Move.node.key)
|
2023-12-13 05:41:49 +00:00
|
|
|
Move.node.pos.x = Move.node.x+Move.node.hs.x
|
|
|
|
Move.node.pos.y = Move.node.y+Move.node.hs.y
|
2023-12-13 03:57:00 +00:00
|
|
|
move_others(Move.node)
|
2023-01-26 04:11:22 +00:00
|
|
|
return
|
|
|
|
end
|
2023-12-13 03:57:00 +00:00
|
|
|
end
|