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 settings with keepRatio set to false are not honored #990

Open
davidalejandroaguilar opened this issue Aug 8, 2023 · 4 comments
Open

Comments

@davidalejandroaguilar
Copy link
Sponsor

Environments

Framework name: StimulusJS
Framework version: 3.2.1
Moveable Component version: 0.51.1
Selecto Component version: 1.26.0
Testable Address(optional): https://codepen.io/davidalejandroaguilar/pen/VwVNxWz

Description

When resizing selected elements with snap settings (snapGridWidth, snapGridHeight, snapThreshold, snapRotationThreshold, snapRotationDegrees) and keepRatio set to false, the elements no longer respect snap settings (50px snapping in the example Codepen).

In the video below, you can see how each individual element can only be resized in 50px increments, however, when both are resized at the same time, they are no longer snapping correctly, and they end up outside the grid.

Screen.Recording.2023-08-07.at.7.21.44.p.m.mov
@davidalejandroaguilar
Copy link
Sponsor Author

davidalejandroaguilar commented Sep 22, 2023

@daybrush Just bringing this into your attention, seems like it's a bug?

EDIT: Oops, sorry, just noticed you were on vacation, my bad and hope you enjoyed them! 🏖️

@daybrush daybrush added this to the 0.51.3 milestone Sep 30, 2023
@daybrush
Copy link
Owner

@davidalejandroaguilar

sorry. I couldn't care much.

your expected behavior

If keepRatio (false) and snapGridWidth and snapGridHeight are set, you want snapGrid to work individually, not on a group basis, right?

@davidalejandroaguilar
Copy link
Sponsor Author

@daybrush I think so, yes.

Each individual element must stay within the grid, even when resizing as a group.

daybrush added a commit that referenced this issue Oct 28, 2023
@daybrush
Copy link
Owner

@davidalejandroaguilar

  • croact-moveable 0.8.0
  • @moveable/helper 0.1.3
  • lit-moveable 0.29.0
  • moveable 0.52.0
  • preact-moveable 0.54.0
  • react-moveable 0.55.0
  • svelte-moveable 0.44.0
  • vue-moveable 2.0.0-beta.86
  • vue3-moveable 0.27.0
  • ngx-moveable 0.49.0

moveable's new version is released. snapGridAll prop is added. Use snapGridAll prop to true.

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

No branches or pull requests

2 participants