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

Doesn't work across offset parents #8

Open
cudasteve opened this issue Dec 23, 2015 · 0 comments · May be fixed by #9
Open

Doesn't work across offset parents #8

cudasteve opened this issue Dec 23, 2015 · 0 comments · May be fixed by #9

Comments

@cudasteve
Copy link

When the snap-to targets are in a different offset parent from the element being resized, their coordinates appear to be incorrectly calculated. Using the same snapping options with $.ui.draggable works. I think the difference might boil down to this:

$.ui.draggable.snap uses $(this).offset() to get each snap-to targets' coordinates at https://github.com/jquery/jquery-ui/blob/master/ui/widgets/draggable.js#L998

$ui.resizable.snap uses $(this).position() to get similar coordinates at https://github.com/polomoshnov/jQuery-UI-Resizable-Snap-extension/blob/master/jquery.ui.resizable.snap.ext.js#L24

I'm going to try to see if I can get it fixed and I'll submit a PR if I do. Regardless, I'll try to do up a plunkr/pen/fiddle/bin/etc to demonstrate.

@cudasteve cudasteve linked a pull request Dec 23, 2015 that will close this issue
charlesmass pushed a commit to charlesmass/jQuery-UI-Resizable-Snap-extension that referenced this issue Jul 11, 2024
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 a pull request may close this issue.

1 participant