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

Snap to dimensions of elements #285

Closed
4 tasks done
swissspidy opened this issue Feb 11, 2020 · 2 comments · Fixed by #488
Closed
4 tasks done

Snap to dimensions of elements #285

swissspidy opened this issue Feb 11, 2020 · 2 comments · Fixed by #488
Assignees
Labels
Group: Editing Main editing features P1 High priority, must do soon

Comments

@swissspidy
Copy link
Collaborator

swissspidy commented Feb 11, 2020

This is a follow-up to #95 and #170.

As described in the epic brief for this feature, when dragging or resizing an element or group of elements, the editor offers alignment help with snap areas:

  • Snap to the sides of other elements (Drag, Resize)
  • Snap to the width/height of elements (Resize)
  • Snap to the center of elements (Drag, Resize)
  • Snap to vertical/horizontal center of the page

As far as I can tell, only 3 out of these 4 types have been implemented.

This issue covers the last remaining one: snapping to dimensions of siblings when resizing elements. This way the user can easily make elements of equal size.

Now, it seems that the Movable library does not support this out of the box, so we might have to do the calculation ourselves (needs confirmation).


Epic


Acceptance Criteria

  • When resizing a single element, it should snap to width and height of other elements on the same page.
  • When resizing multiple elements, the movable container should snap to width and height of other elements on the same page.
@swissspidy swissspidy added Group: Editing Main editing features P1 High priority, must do soon Version 1.0 labels Feb 11, 2020
@jauyong jauyong added this to the Sprint 23 milestone Feb 11, 2020
@dvoytenko
Copy link
Contributor

/to @wassgha for triage only. I believe resize snapping is not in Moveable at this time. Let's check and file a bug for them. Once done, please unassign the bug for prioritization. If confirmed, we'll likely need to contribute code to Moveable.

@samitron7
Copy link

I zipped up a .mov file but also shared this on slack. Let me know if you can't view it.

snap2closestDistance.mov.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Editing Main editing features P1 High priority, must do soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants