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 move selection #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add move selection #42

wants to merge 1 commit into from

Conversation

nellyvo
Copy link

@nellyvo nellyvo commented Feb 11, 2025

Fixes #34

Pull Request Summary

This pull request introduces an enhancement to the selection tool that allows users to move the selection (and its underlying drawing) without copying it when no modifier key is pressed.

Key Changes:

  • New Functionality: When the selection is locked and the user clicks inside it without holding the Alt key, the content is moved from its original location (which is cleared to transparent) to the new position.
  • Preserved Behavior: The existing copy-and-move behavior using the Alt key remains unchanged.
  • Code Modifications: Only the eventhandlers.js related to selection manipulation have been updated.
  • Testing: The new feature has been thoroughly tested and works as expected.

@Kully
Copy link
Owner

Kully commented Feb 24, 2025

@nellyvo Nice, this is really good work. It works as I pictured it.

One thing I noticed is that once you make a selection and then click and do not move the cursor (mousedown):

  • the drawing within the bounds of the selection is not visible
  • the cursor is still the crosshair and not the dragging icon

Here's a video to show you:
https://github.com/user-attachments/assets/eb0c1df7-f819-49f0-9d1f-2de251a2e99c

Can you make sure that the drawing is visible and the cursor looks like it does during drag mode?

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.

Allow moving a selection in the canvas around
2 participants