Skip to content

Canvas zoom and position reset when switching diagram tabs or tools #640

Open

Description

@prasadadhav

Describe the bug

When I switch away from a diagram or tool and then return, the canvas view resets instead of retaining its previous zoom level and position. The canvas often returns to its default position near the top-left, so I have to zoom and pan again to resume working.

I have observed this with class diagrams and with other zoomable canvases, including agent diagrams.

To Reproduce

  1. Open a diagram with enough content to require zooming or panning, such as a AI Sandbox class diagram or library agent.
  2. Zoom in or out and/or pan the canvas to a particular view.
  3. Switch to another diagram tab, or navigate to another tool (for example, a state diagram or GUI builder).
  4. Return to the original diagram.
  5. Observe that the canvas view has reset.

Expected behavior

When returning to a diagram or tool, its canvas should retain the zoom level and position it had when I left. This should apply consistently to all diagram and tool canvases that support zooming or panning.

Screenshots

A short screen recording showing the view before switching and after returning to help illustrate the issue.
https://github.com/user-attachments/assets/e5ddce49-a4f6-40ba-bdd2-5f7f096a5e74

Additional context

This appears to affect multiple zoomable canvas types, not only class diagrams. BESSER WME supports multiple diagram types and tabs, so preserving the view per diagram/tab would make it easier to move between models without repeatedly restoring the canvas view.

Observed in the browser during the same working session; I have checked even after reload we get same behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguxUser experienceweb modeling editorLinked to the Web Modeling Editor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions