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)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nick.kreeger, Assigned: nick.kreeger)

References

Details

Attachments

(2 files, 3 obsolete files)

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.
Attached file Testcase (deleted) —
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
Attached patch Patch V1 (obsolete) (deleted) — Splinter Review
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)
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)
Attachment #342026 - Flags: review?(neil) → review-
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.
Attached patch Patch V2 (obsolete) (deleted) — Splinter Review
Here is an updated patch, it moves the fix into |_getColumnAtX()|.
Attachment #342026 - Attachment is obsolete: true
Attachment #343936 - Flags: review?(neil)
Attached patch Patch V2 (obsolete) (deleted) — Splinter Review
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)
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)
Attached patch Patch V2 (deleted) — Splinter Review
Real patch, sorry for the patch-spam... shouldn't be working to early in the morning...
Attachment #343949 - Flags: review?(neil)
Attachment #343949 - Flags: review?(neil) → review+
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)
Attachment #343949 - Flags: superreview?(roc)
Attachment #343949 - Flags: superreview?(roc) → superreview+
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
Blocks: songbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: