graph drawing tool

snapshot: insight

Ugh, it's been in front of my eyes all along. The logs have been repeatedly showing a recurrence within a single frame:

key press -> update Viewport.y from screen_top -> A -> B -> update_editor_box -> update screen_top from Viewport.y

We need both those updates, but both should never occur at the same time to the same node.

I think this is why screen panning works if I take out the scale inside update_editor_box: the scale has already happened "once" in updating Viewport.y, and it doesn't converge if we perform it a second time in a frame. But the solution is just to do one or the other to a node, never both.

I knew this (learned it the hard way) when I first built pensieve.love, and I had an assertion to avoid it. But my assertion was brittle, and it kept failing, and I took it out, and then I slowly took out all the code that prevented this recurrence.

Created by  Kartik K. Agaram  on October 25, 2023
TZNPEHB3BRUHATVYAODURZUR45TYV62HYWQK5SUXHAOLVGYJVP7AC
Change contents