Is your feature request related to a problem? Please describe.
I'm always frustrated when ... I open a large diagram and I have to go find my place again. Diagrams can get large, and can have several pages each with large diagrams. I have several like this that I build on regularly, but sometimes time goes by and I don't remember exactly where I was when I last worked on it. Even if I do remember, it's time consuming to scroll and zoom back to my place for each page every single time.
Describe the solution you'd like
The "home" view state for each page of a the diagram can be saved. The state includes the zoom level, the scroll position, and an auto-save boolean.
In the "View" menu, next to "Reset View", is a new action to "Set Home View", which will save the current view state to the page properties. A keyboard shortcut is also supported for this action.
The "home view" zoom and scroll position for the page will be used when the "Reset View" action is invoked.
The auto-save boolean can be set by the user using a checkbox named "Persistent view" in the "Diagram" properties tab, in the "View" section alongside "Background Color", "Shadow", etc:
- When checked (the default), the page view state values will be saved as the "home view" when the application exits. This allows the user's last state to be preserved.
- When unchecked, page view state will not be saved on exit, and the last set home view will be what is saved. This allows the user to "lock" a diagram to a particular view state.
When a diagram is opened, each page's "home view" state is restored:
- if the view state is missing (older diagrams), then current behavior is used
- otherwise, the zoom, scroll, and auto-save are restored for each page in the diagram
If a diagram is being edited collaboratively and auto-save is enabled for a page, then last one out wins. If this is not desired by the users, then auto-save for that page can be disabled, leaving only the manual "Set Home View" option.
Describe alternatives you've considered
I have tried using a custom link to set the "viewbox", which I could then click after opening the diagram. This partially works, because I can set the scroll. However,
- the zoom level is inconsistent and affected by the size of the application window
- changing the viewbox settings is very manual and time consuming, making it fairly impractical
Additional context
Thank you for providing such a powerful tool for diagramming. I appreciate your consideration of this suggestion.
Restoring state is actually a very common feature for many types of editors:
- VS Code restores the state of all of my open editors, cursor positions, window arrangements, etc when I start it
- MS Office apps have a "pick up where you left off" feature
- by browser restores all of my tabs at start
- I can do a full restart of my iPhone, and when it's back, ever single app is exactly how I left it (most of the time)
For daily use of drawio, which we all want, this can be a big time saver, and will provide a more seamless experience.
Is your feature request related to a problem? Please describe.
I'm always frustrated when ... I open a large diagram and I have to go find my place again. Diagrams can get large, and can have several pages each with large diagrams. I have several like this that I build on regularly, but sometimes time goes by and I don't remember exactly where I was when I last worked on it. Even if I do remember, it's time consuming to scroll and zoom back to my place for each page every single time.
Describe the solution you'd like
The "home" view state for each page of a the diagram can be saved. The state includes the zoom level, the scroll position, and an auto-save boolean.
In the "View" menu, next to "Reset View", is a new action to "Set Home View", which will save the current view state to the page properties. A keyboard shortcut is also supported for this action.
The "home view" zoom and scroll position for the page will be used when the "Reset View" action is invoked.
The auto-save boolean can be set by the user using a checkbox named "Persistent view" in the "Diagram" properties tab, in the "View" section alongside "Background Color", "Shadow", etc:
When a diagram is opened, each page's "home view" state is restored:
If a diagram is being edited collaboratively and auto-save is enabled for a page, then last one out wins. If this is not desired by the users, then auto-save for that page can be disabled, leaving only the manual "Set Home View" option.
Describe alternatives you've considered
I have tried using a custom link to set the "viewbox", which I could then click after opening the diagram. This partially works, because I can set the scroll. However,
Additional context
Thank you for providing such a powerful tool for diagramming. I appreciate your consideration of this suggestion.
Restoring state is actually a very common feature for many types of editors:
For daily use of drawio, which we all want, this can be a big time saver, and will provide a more seamless experience.