PDA

View Full Version : TreePanel: horizontal scroll while dragging long lines



simon_price
1 Jan 2007, 3:48 AM
When you drag a text line that is wider than the panel window, the panel scrolls to the extreme right position, which makes it impossible to see the drop target nodes (which have now scrolled off the left of the screen).

Adding horizontal scrolling, like the vertical scrolling, while dragging would be one solution. A simpler one (for the user) would be to suppress the scroll right as you pick up a long line.

Workaround: ensure shorter lines or a wider panel.

jack.slocum
2 Jan 2007, 6:12 AM
I just looked at it and this is going to be interesting.

The problem is that when you click on the anchor in the tree node, the anchor focuses (this is by the browser). Focusing the anchor causes it to scroll entirely into to view (or at least it tries to). This happens before the drag and drop operation is in play (try clicking a long link without dragging). The focus is needed, but I may be able to find a workaround for the scroll.

You should still be able to drag. It does support horizontal scrolling, just get close to the left/right edge. If you are very close to the bottom vertical scrolling takes over and horizontal scrolling is cancelled.