-
Notifications
You must be signed in to change notification settings - Fork 115
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 grid #21
base: master
Are you sure you want to change the base?
Snap to grid #21
Conversation
Snap resize to predefined grid size.
var offset = (axis == 'x') ? start - e.clientX : start - e.clientY; | ||
|
||
// bind resize to grid | ||
var gridX = scope.rGrid[0] || 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If r-grid
isn't set on the resizable element, this logs an error. Instead maybe use:
var gridX = scope.rGrid ? scope.rGrid[0] : 1,
gridY = scope.rGrid ? scope.rGrid[1] : 1;
This looks great! I added one comment, but couldn't find any more problems. Swap that out and we can merge :) |
Added parameter "rLimitResizeTo" to limit resize step.
Hi, any update when this will be merged? I really need this feature. |
This would be awesome. Any chance of this getting merged? |
👍 |
1 similar comment
👍 |
Snap resize to predefined grid size.