Currently, when navigating forward or back in history, switching workspaces, or restarting Obsidian, the zoom state is lost. It would be helpful if the current zoom information could be included in the view state (and set from it), so that the zoom state is persistent.
One way this could be implemented would be to wrap the get/set state functions for the markdown editing subview to add an extra property to the ephemeral state (on get), and to query it (on set) to apply it.
Since notes can change on disk while the note is not visible, it would probably be best for the state to be include either a "subpath" link (in the case of header/block zoom, i.e. #header-name or #^block-id) or the text of the list item. On loading of the state, the note can be checked to ensure that the matching header/text/block is in the correct place, and if not, search for it. (This approach would also allow Hover Editor to pop notes up already zoomed to the target of a header/block link.)
I'd be willing to work on a PR for this, if you're open to the idea. Thanks!
Currently, when navigating forward or back in history, switching workspaces, or restarting Obsidian, the zoom state is lost. It would be helpful if the current zoom information could be included in the view state (and set from it), so that the zoom state is persistent.
One way this could be implemented would be to wrap the get/set state functions for the markdown editing subview to add an extra property to the ephemeral state (on get), and to query it (on set) to apply it.
Since notes can change on disk while the note is not visible, it would probably be best for the state to be include either a "subpath" link (in the case of header/block zoom, i.e.
#header-name
or#^block-id
) or the text of the list item. On loading of the state, the note can be checked to ensure that the matching header/text/block is in the correct place, and if not, search for it. (This approach would also allow Hover Editor to pop notes up already zoomed to the target of a header/block link.)I'd be willing to work on a PR for this, if you're open to the idea. Thanks!