Bug 944

Summary: Panmap widget - wrong extent after drag
Product: Chameleon Reporter: Jacob Delfos <jacob.delfos@maunsell.com>
Component: WidgetAssignee: Paul Spencer <pspencer@dmsolutions.ca>
Status: RESOLVED FIXED    
Severity: normal CC: chameleon-dev@lists.maptools.org
Priority: P2    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description From 2005-02-01 02:46:09
In javascript mode (and perhaps normal mode), the panmap widget was not working
as it should. The image after dragging the map did not have the right extent. In
panmap.widget.php, on line 421, there is an if-statement testing whether the
mouse coordinates are smaller than 0. I don't know why this is there (was it
supposed to test whether the mouse coordinates are > 0?), but getting rid of the
condition, leaving the content of the body of the if-statement, fixes the problem:

-----------------------------------------------------------------
$szJsFunctionName = "PanMapWDragStart";
        $szFunction = <<<EOT
/**
 * {$szJsFunctionName}
 * called when the drag starts in PanMap widget.
 */
function {$szJsFunctionName}(x,y)
{
      gnPanWFirstPointX = gMapWmouseX;
      gnPanWFirstPointY = gMapWmouseY;
}
--------------------------------------------------------------

Jacob
------- Comment #1 From 2005-02-11 09:29:11 -------
add to 2.0 and 2.1
------- Comment #2 From 2005-05-09 11:40:58 -------
Paul,

did this make it into 2.0.1? Not in my copy of 2.0.1 :-) . Jacob's fix also
worked for me.

Bart
------- Comment #3 From 2005-05-16 08:12:29 -------
Made this change in both 2.0 and 2.2.

2.2: revision: 1.11
2.0: revision: 1.9.2.1