Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zoom and pan shortcuts. Prevent page from accidental navigation or reload #392

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

orozcodiaz
Copy link

Summary of Changes

Shortcut Keys Implementation

Added keyboard shortcuts to improve the user experience:

  • 'z': Zoom out.
  • 'x': Zoom in.
  • 'c': Toggle pan mode (image drag mode).

These shortcuts provide quicker access to essential functionalities while working in the editor.

Prevent Page Reload or Unintentional Navigation

Implemented functionality to prevent the page from closing or navigating away (forward/backward) unintentionally.
A confirmation prompt is shown when the user tries to reload the page or navigate away, helping avoid accidental loss of progress.

Reason for Change

The addition of shortcuts simplifies user interaction, making the app more efficient.
Preventing accidental page reloads or navigation ensures that the user's work is not lost unexpectedly.

Testing

  • Verified that the keyboard shortcuts ('z', 'x', 'c') work as expected and trigger the correct actions (zoom in, zoom out, toggle pan mode).
  • Confirmed that attempting to reload or navigate away from the page triggers a confirmation dialog to prevent accidental data loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant