Skip to content

Conversation

@elmehdiamlou
Copy link
Contributor

@elmehdiamlou elmehdiamlou commented Oct 21, 2023

Description

When wanting to drag a grid item within a parent that is scaled using CSS transforms it doesn't work properly.

This PR serves as a solution for issue #1275 by determining the scaling factor applied to the parent to adjust the grid position and size. e.g. if the parent is scaled with scale(0.5), the scaling factor will be 2.

Additionally, here is a video demonstrating how this fix works in action.

gridstack.mp4

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

@adumesny
Copy link
Member

thank you for using existing code and just adding scale to it - this makes sure all existing path will continue working. wish I had not wasted so much time on @VincentMolinie review and frequent breakage....

@VincentMolinie
Copy link
Contributor

Glad I could help... I was just trying to help

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.

3 participants