[ka-Map-dev] [Bug 1679] Right click - KAMAP_CONTEXT_MENU

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Mon Mar 12 16:06:26 EST 2007


http://bugzilla.maptools.org/show_bug.cgi?id=1679

dave at smartrak.co.nz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #177 is|0                           |1
           obsolete|                            |



------- Additional Comments From dave at smartrak.co.nz  2007-03-12 16:06 -------
Created an attachment (id=178)
 --> (http://bugzilla.maptools.org/attachment.cgi?id=178&action=view)
Updated patch

I've created the patch differently this time, it should apply better.

The aim of the patch is to make the event KAMAP_CONTEXT_MENU be triggered when
the user right clicks on the map.
Previously there was code for this inside kaMap_onmousemove, which did not work
correctly.
This patch moves the code into kaMap_onmousedown and changes the event to send
the clicked on coordinates with the callback.


After testing my previous patch I discovered that the coordinates were not
correct if the map area didn't touch the top left of the screen. To fix this
you have to call this.kaMap.currentTool.adjustPixPosition(x,y); to recursively
adjust the mouse position.

As you may want to call adjustPixPosition when there is no current tool set (or
without going through the current tool as in this case), I have moved the
adjustPixPosition function into kaMap, and altered the kaTool implementation to
call it.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the ka-Map-dev mailing list