Skip to content

Commit 0503a93

Browse files
feat(gui): enhance zoom functionality and improve tree visualization
- Updated CONTEXT.md to clarify the definitions of Camera, Zoom, and Fit-to-pane, emphasizing their roles in the output pane. - Refactored app.py to integrate new zoom features, including keyboard shortcuts for zooming in, out, and resetting to 100%. - Implemented functions for scaling tree layouts and managing viewport positions, ensuring consistent behavior during zoom operations. - Enhanced tooltip descriptions for better user guidance on zoom and fit functionalities. - Added tests for new zoom features and layout scaling to ensure functionality and correctness.
1 parent e9e7fdd commit 0503a93

6 files changed

Lines changed: 535 additions & 75 deletions

File tree

‎CONTEXT.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ The Output pane that shows the DS Tree canvas, not the OS screen or device.
2424
_Avoid_: device, window (when you mean the tree pane)
2525

2626
**Camera**:
27-
The Output pane's scroll position over a natural-size DS Tree. A tree that fits the pane is centred; Fit scrolls a larger tree so its middle is in view.
28-
_Avoid_: scale-to-fit layout, stretch, zoom
27+
The Output pane's scroll position over the DS Tree at the current Zoom. A tree that fits the pane is centred; Fit scrolls a larger drawing so its middle is in view.
28+
_Avoid_: scale-to-fit layout, stretch
29+
30+
**Zoom**:
31+
A uniform scale of the natural-size DS Tree. Boxes and lettering grow or shrink together. 100% is intrinsic size.
32+
_Avoid_: stretch-to-fill, reflow, fit
2933

3034
**Fit-to-pane**:
31-
Scrolling a natural-size DS Tree so its middle sits in the Viewport. Node boxes stay at their intrinsic size.
32-
_Avoid_: zoom, fit-to-viewport layout
35+
Scrolling the DS Tree at the current Zoom so its middle sits in the Viewport. It does not change Zoom.
36+
_Avoid_: zoom, shrink-to-fit
3337

3438
**Interpretation**:
3539
One DAG tuple in the sequence reached by stepping the parser after a sentence, shown as an index in 1 / N.

0 commit comments

Comments
 (0)