boxer-project / boxer-sunrise

Sunrise on the Boxer Reconstruction Project
BSD 3-Clause "New" or "Revised" License
38 stars 2 forks source link

Graphics Box cannot be resized (impacts "Vectors Demo" microworld) #80

Open rigdern opened 6 days ago

rigdern commented 6 days ago

Repro steps

I reproed this with Boxer 3.4.18 2024-05-26 on macOS

  1. Open the "Vectors Demo" microword file.
  2. In Boxer, click the microwold's box to navigate into it.
  3. Click the "Apollo Missions - Flight to the Moon" box to navigate into it.
  4. Click and drag the resize handle of the acc graphics box to resize it

Expected result: The acc graphics boxes grows and shrinks as you drag its resize handle.

Actual result: The acc graphics box doesn't change size at all but it looks like the graphics inside of it move around.

This issue repros on any of the graphics boxes on this screen (e.g. vel, acc, and main graphics box that shows the spaceship).

Could this be related to #79?

Impact

This impacts the "Vectors Demo" microworld.

sgithens commented 5 days ago

Huh, yeah, they aren't resizing. I can see this and the other vectors issue you opened. I think it's probably an option on the screen-box or box internal datastructure that got looked over with the recent layout work

sgithens commented 1 day ago

This is a good catch, and something minor-ish that I missed when updating the layout.

When a graphics box is flipped to it's text side, it's size (when manually resized is determined by the fixed-wid and fixed-hei members of the display-style on the screen-boxes actual-obj display-style-list property.

Now, when a graphics-box is in graphics mode, it's size is determined by the actual-objs graphics-sheet-draw-hei and graphics-sheet-draw-wid.

The issue is that in (defmethod dimensions screen-box I'm not checking if it's flipped to graphics and applying the text sides fixed-wid and fixed-hei. So, this issue only occurs if both the text side and graphics side are manually resized, with the text side taking precedence.

Putting in a small check (if it's flipped to graphics), to fix this.

sgithens commented 12 hours ago

This should be fixed now in 289f5cee443585cfb4a3b7047a631fdfa1af5e7c . Will leave open until it's verified against the next build (should be available before the end of June).