Fit (zoom-to-fit) state is not persisted across reload #28
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Clicking the Fit button in the zoom toolbar re-centers and rescales the stage to fit all content, but the resulting zoom/pan is not written to localStorage. After a page reload the board comes back at its previously-saved view (from the last wheel/drag/setZoom) instead of the fitted view.
Root cause:
WhiteboardApp.zoomReset()inapp.jssetsstage.scale(...)andstage.position(...)directly without callingWhiteboardCanvas.saveView(). The same issue exists infitMindmapToView()(used by the mindmap fullscreen view).Fix: call
WhiteboardCanvas.saveView()at the end of both functions, and before each early-return that has already mutated the stage.Pull request opened: #29