Bug 944 - Panmap widget - wrong extent after drag
: Panmap widget - wrong extent after drag
Status: RESOLVED FIXED
: Chameleon
Widget
: 2.0
: PC Windows 2000
: P2 normal
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-02-01 02:46 by
Modified: 2005-05-16 08:12 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


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