Skip to content

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

Open
orozcodiaz wants to merge 4 commits into
SkalskiP:developfrom
orozcodiaz:develop
Open

Add zoom and pan shortcuts. Prevent page from accidental navigation or reload#392
orozcodiaz wants to merge 4 commits into
SkalskiP:developfrom
orozcodiaz:develop

Conversation

@orozcodiaz

Copy link
Copy Markdown

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