dragtable
dragtable copied to clipboard
Scroll Bars throws it off
When I'm dragging on a table wide enough to cause the page to have a hozitontal scroll bar, the position of the column I'm moving has an offset that does not seem to take the visible window into account, and is not at the same position as the cursor.
I can't provide an example this moment as this is on an internal project server that isn't accessible outside my building, but it should be easy to simulate. If you're unable to recreate this, I can produce an example later on.
if you could setup a jsfiddle of the issue your describing above, I'll more than happy to a look. What browser and version are you experiencing this in?
I had this problem too.
Look for this line:
left: ( self.currentColumnCollectionOffset.left + o.appendTarget[0].scrollLeft )
Replace it with this:
left: ( self.currentColumnCollectionOffset.left)
Somehow the very code that I imagine is supposed to handle the scrolling, actually breaks it, at least for my situation.
I believe the problem had to do with the visible window and full window. I don't believe it took the offset correctly into account when the table width was wider than the screen could fit. I'll set up an example, but I'm also testing that code right now. I can have a test ready early next week.
Thanks for testing. I haven't done anything more than try it in current browsers and it seems to work for me at least. Just wanted to throw it out there if it helps anyone else.
I've actually made quite a few mods to this, some I've added to issues. At some point I'll be looking at the problem where the Drag Column's empty cells don't have the correct height and therefore looks ugly whilst dragging in some situations.
By the way, no disrespect to the author. It's the best and simplest implementation I've seen after much searching today. Just needed to mod a few things for it to work for me, which is understandable. Thanks jebaird :)
Hey Guys, I'm trying to understand whats going on here. @faceless105 does your table have a fixed width applied by a class or inline style?
When I applied a fixed width to the tables in the demo to make the browser show scroll bars, the dragging gets quite wonky. Is that the case for you?
Hey, had the same problem and tried the proposed solution of @sitesense. It seems to work. Thank you.