MewPurPur / GodSVG

A vector graphics application for structured SVG editing, available on all major desktop platforms. Currently in late alpha.
https://godsvg.com
MIT License
1.23k stars 57 forks source link

Implemented "View In List" #719

Closed WeaverSong closed 4 months ago

WeaverSong commented 4 months ago

Adds a "View In List" option when right-clicking a handle. This will scroll the tag list so that the selected tag is at the top of the view. If the selected handle is an inner command, the scroll will be offset based on its position, such that the first inner command will have the selected tag at the top of the view.

MewPurPur commented 4 months ago

The new option should only be shown when you've right-clicked a handle, not when you've right-clicked a tag editor. I suggest making it so if you right-click on a handle, it passes some context to the Indications.gd method, for example "viewport", which is then checked against to decide if the option should be there.

If the selected handle is an inner command, the scroll will be offset based on its position, such that the first inner command will have the selected tag at the top of the view.

I'd say, we should have a fixed offset for where the selected tag would be, for example 20% of the tag container's height. The metric you've mentioned here can be user-defined, for example with a lot of unrecognized tags, to the point where the path command can end up outside of the screen.

MewPurPur commented 4 months ago

You need to run the update_translations.gd script to add the new string.

MewPurPur commented 4 months ago

Thanks!