Skip to content

The placeholder will not move correctly when container is manually scrolled. #31

bjggzxb opened this Issue Jul 27, 2013 · 5 comments

3 participants

bjggzxb commented Jul 27, 2013

Hey, Jonny.
Thanks for your plugin first, I really like it.

Maybe it is an asked question, but it really confused me.

I'm handling a long list, I want to move the item from beginning to end, so I bind 'mousemove' listener and manually scroll the container.

But the placeholder will not update with the 'scroll', it just stays. I think maybe I should also update the position of the placeholder manually, so I read the source code but still could not figure it out.

Could you tell me is there a way to scroll and update the placeholder?

johnny commented Jul 31, 2013

Damn, I deleted my comment. Did you get, what I wrote?

The short version is, you need to customize onDrag. See for an example.

If you post your solution, I will make an example out of it.

GomZik commented Jul 31, 2013

I've got answer on my email.

The best place would be to hook into the onDrag function, which gets called on mousemove. It defaults to

function ($item, position, _super) {
position holds the value to set the absolutely positioned $item. See for a custom onDrag function.

Please report back if this worked for you. If you get this working, could you post your solution in this thread? I would be willing to add an example with this behaviour.

johnny commented Jul 31, 2013

Thanks for rescuing that!

bjggzxb commented Jul 31, 2013

OK, I got the point!

I will have a try.

Thanks for your help!

johnny commented Feb 19, 2014

duplicate of #67, closing since there is a proposed solution

@johnny johnny closed this Feb 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.