|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
context click pixel offsets wrong for MS-Windows XUL client
or rather, I should say, they MAY be wrong:
I have a scrolling tree 10 columns and column headers with a context menu attached. I have a function that checks the location of the context mouse-click and enables/disables various menu items in the context menu depending on the nature of the cell/column/row clicked on, acquiring the cell details using treeBCellAt() The standard mechanism for accessing the mouse position would be: var mX = popupevent.clientX - var mY = popupevent.clientY - but in this instance, the Y-coordinates of the context click are out by 23 pixels (precisely the height of the tree column head). I have examined all the following variables to see if there is some other way of getting the right values but have found nothing useful, no matter what math I do: popupevent.clientX popupevent.clientY popupevent.layerX popupevent.layerY popupevent.pageX popupevent.pageY X Y X Y Can somebody advise me if there is a way to get the absolutely correct Y-coordinate of the context click? or is this a bug? dev-tech-xul mailing list dev-tech-xul (AT) lists (DOT) mozilla.org |
|
#2
|
|||
|
|||
|
context click pixel offsets wrong for MS-Windows XUL client
mixit wrote:
or rather, I should say, they MAY be wrong: I have a scrolling tree 10 columns and column headers with a context menu attached. I have a function that checks the location of the context mouse-click and enables/disables various menu items in the context menu depending on the nature of the cell/column/row clicked on, acquiring the cell details using treeBCellAt() The standard mechanism for accessing the mouse position would be: var mX = popupevent.clientX - var mY = popupevent.clientY - but in this instance, the Y-coordinates of the context click are out by 23 pixels (precisely the height of the tree column head). You should just be passing clientX and clientY directly to getCellAt. / Neil dev-tech-xul mailing list dev-tech-xul (AT) lists (DOT) mozilla.org |
![]() |
| Viewing: Web Development Archives > Mailing Lists > Mozilla > context click pixel offsets wrong for MS-Windows XUL client |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|