Skip to content

Add dragging of layers with the select tool #293

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

Merged
merged 4 commits into from
Jul 24, 2021
Merged

Conversation

henryksloan
Copy link
Contributor

@henryksloan henryksloan commented Jul 22, 2021

Closes #143

  • Added a DragLayer message to DocumentMessage that accepts a path and an offset
  • Modified the select tool's FSM to allow:
    • Dragging all selected layers
    • Dragging a single previously unselected layer
    • Drawing a quad and selecting everything within it (by starting the drag on the background)
    • Deselecting everything by clicking the background

This change is Reviewable

@henryksloan henryksloan requested review from Keavon and TrueDoctor July 22, 2021 22:26
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 22, 2021

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5116776
Status: ✅  Deploy successful!
Preview URL: https://4d50156e.graphite-master.pages.dev

View logs

Copy link
Member

@TrueDoctor TrueDoctor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add comments where you used the root transform? e.g.
// TODO: Replace with functions of the transform api
this will at least make it easier to fix it afterwards

@Keavon
Copy link
Member

Keavon commented Jul 23, 2021

This looks good to me at a cursory read-through, but the backend code is not my domain of expertise so I defer to True Doctor. Looks like this needs to be synced with master and then you have my blessing to merge if True Doctor is also ok with it.

@henryksloan henryksloan merged commit d15d7d0 into master Jul 24, 2021
@henryksloan henryksloan deleted the grab-drag-layers branch July 24, 2021 01:51
Keavon pushed a commit that referenced this pull request Jun 16, 2022
* Add dragging of layers with the select tool

* Transform mouse positions based on root transform

* Add TODOs regarding root inverse transforms
Keavon pushed a commit that referenced this pull request Jul 30, 2023
* Add dragging of layers with the select tool

* Transform mouse positions based on root transform

* Add TODOs regarding root inverse transforms
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.

Select Tool: Grab/drag selected layers around viewport
3 participants