Instead of having 2 variables for left & right nodes, use an array instead. This will help with better looking code, automation and less repetitive code, as seen in ToolButtons.gd. Move related refactoring will follow.
his means that, if you have a brush largen than 1px, you can draw on the edges of the canvas. All pixels that are being drawn outside of the canvas will still have no effect.
Moved code from Global.gd and Canvas.gd to DrawingAlgos.gd. Will also move the fill_gaps and draw_brush methods of Canvas.gd next. Maybe even refactor the inside of them a bit to make them easier to read.
The color picker was picking color values left over from an undo operation. Meaning, if you drew something and then undid it, the color picker would pick the color before the undo.
Put the new code in a new fit_to_frame() method inside CameraMovement.gd. The old code did not work properly for images with width larger than their height.
It used to save the linked cel array which contained the canvas nodes into the .pxo. This, however, does not make sense, because the canvas nodes are being recreated when a .pxo is loaded. Therefore, they are different nodes than they used to be.
Now, an array containing the frame numbers which have cels linked for each frame is being saved and loaded into the pxo.
Made a new "src" folder that will contain the source code files, like all the GDScript and scene files. Please read this for more details: https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/
It made no sense to keep scenes separate from their scripts. More file organizing will follow soon.