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 grid #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Snap to grid #21

wants to merge 2 commits into from

Conversation

arcadeJHS
Copy link

Snap resize to predefined grid size.

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,
Copy link
Owner

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;

@Reklino
Copy link
Owner

Reklino commented Jul 19, 2015

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.
@gehrmanng
Copy link

Hi, any update when this will be merged? I really need this feature.

@iworkinprogress
Copy link

This would be awesome. Any chance of this getting merged?

gehrmanng pushed a commit to gehrmanng/angular-resizable that referenced this pull request Jun 26, 2016
@santiagodoldan
Copy link

👍

1 similar comment
@demonmind
Copy link

👍

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.

7 participants