mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 05:37:23 -06:00
Fix #40: W/H constrain-proportions link in the Properties panel and Control bar
The Transform panel had the link, but kept it in panel-local egui memory; the Properties panel's Transform section and the Control bar had none, so size changes there were never proportional. The link is now the constrainProportions preference (prefs.get/prefs.set), one toggle shared by the three places (transform::constrain_link), and every W/H field passes it to object.setBounds as `proportional`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6780ffae60
commit
6992c843b4
+11
@@ -1667,3 +1667,14 @@ its undo history are as if the click never happened. Commands on the edited text
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"text.discardEmpty","params":{"id":42}}}
|
||||
```
|
||||
|
||||
## Constrain proportions
|
||||
|
||||
The link between W and H in the Transform panel, the Properties panel and the Control bar is the
|
||||
`constrainProportions` preference (`prefs.get` / `prefs.set`). With it on, those fields send `proportional: true`
|
||||
to `object.setBounds`, which scales the other dimension by the same factor; agents pass `proportional` themselves.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"prefs.set","params":{"key":"constrainProportions","value":true}}}
|
||||
{"name":"run_command","arguments":{"command":"object.setBounds","params":{"width":200,"proportional":true}}}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user