Closed
Bug 458856
Opened 16 years ago
Closed 16 years ago
tree horizontal scroll bar messes up drag-and-drop column rearranging
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: nick.kreeger, Assigned: nick.kreeger)
References
Details
Attachments
(2 files, 3 obsolete files)
(deleted),
application/zip
|
Details | |
(deleted),
patch
|
neil
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Currently, the column dragging code does not take into account the horizontal scrollbar position when calculating which column to hover over. This makes it a problem if you scroll all the way to the right and drag the furthest column to the left. This can simply be fixed by taking in account the horizontal scrollbar position along with the event X coordinate.
I'll attach a patch and a testcase.
Assignee | ||
Comment 1•16 years ago
|
||
Here is a testcase (as a zip) it contains some CSS to help make the current dragging operation a little bit clearer.
Assignee: nobody → nick.kreeger
Assignee | ||
Comment 2•16 years ago
|
||
Here is a proposed patch, it simply takes into account the horizontal position of the tree box frame along with the event's X coord.
Attachment #342026 -
Flags: review?(neil)
Comment 3•16 years ago
|
||
So, we need to decide which coordinates _getColumnAtX uses:
1. Adjusted client coordinates (as per your patch)
2. Client coordinates (need to move the fix into _getColumnAtX)
3. Screen coordinates (can be rewritten to avoid .horizontalPosition)
Updated•16 years ago
|
Attachment #342026 -
Flags: review?(neil) → review-
Comment 4•16 years ago
|
||
Comment on attachment 342026 [details] [diff] [review]
Patch V1
(In reply to comment #3)
>So, we need to decide which coordinates _getColumnAtX uses:
>1. Adjusted client coordinates (as per your patch)
>2. Client coordinates (need to move the fix into _getColumnAtX)
>3. Screen coordinates (can be rewritten to avoid .horizontalPosition)
smaug says that full zoom will confuse screen coordinates, and I've therefore decided that option 2. is best.
Assignee | ||
Comment 5•16 years ago
|
||
Here is an updated patch, it moves the fix into |_getColumnAtX()|.
Attachment #342026 -
Attachment is obsolete: true
Attachment #343936 -
Flags: review?(neil)
Assignee | ||
Comment 6•16 years ago
|
||
Sorry, new laptop - no hgrc... here is a -8 line patch.
Again, sorry for the bug spam.
Attachment #343936 -
Attachment is obsolete: true
Attachment #343937 -
Flags: review?(neil)
Attachment #343936 -
Flags: review?(neil)
Assignee | ||
Comment 7•16 years ago
|
||
Comment on attachment 343937 [details] [diff] [review]
Patch V2
hrm... this isn't working for me now... backing off review flag.
Attachment #343937 -
Attachment is obsolete: true
Attachment #343937 -
Flags: review?(neil)
Assignee | ||
Comment 8•16 years ago
|
||
Real patch, sorry for the patch-spam... shouldn't be working to early in the morning...
Attachment #343949 -
Flags: review?(neil)
Updated•16 years ago
|
Attachment #343949 -
Flags: review?(neil) → review+
Comment 9•16 years ago
|
||
Comment on attachment 343949 [details] [diff] [review]
Patch V2
> var currentX = this.boxObject.x;
>+ var adjustedX = aX + this.treeBoxObject.horizontalPosition;
Or you could have directly used aX +=
(I know some people don't like modifying arguments)
Assignee | ||
Updated•16 years ago
|
Attachment #343949 -
Flags: superreview?(roc)
Attachment #343949 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 10•16 years ago
|
||
Pushed:
parent: 20817:d3cdb61f7d29
user: Nick Kreeger <nick.kreeger@park.edu>
date: Fri Oct 24 15:43:59 2008 -0700
summary: Merge bug 458856
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•