datastructures-visualization
datastructures-visualization copied to clipboard
2-3-4 Tree object not being placed correctly during zoom
The Tree234 object box is placed at the top of the canvas with an arrow linking it to the root 2-3-4 node. When zooming out, the object box becomes separated from the arrow, effectively drifting upwards.
Here are figures showing how it used to behave:
A 2-3-4 tree with 55 random elements:

Zooming out 4 times produces:

Changes to the code cause the display to now look like this:

Commit 18dfd98 did not have this problem. You can see the difference by running:
git dt 18dfd98 HEAD Tree234.py
The first thing I notice in that version is the setting of self.ROOT_Y0 = 25 when it used to be 0.