loftywaif002 / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

[KeyDragZoom] Fix for Javascript Exception in IE8 #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Demo link or sample code:
http://google-maps-utility-library-v3.googlecode.com/svn/tags/keydragzoom/2.0.2/
examples/visual.html

What steps will reproduce the problem?
1. Hold Shift key or click zoom icon
2. Single-click on map without dragging.

Expected result:
No action

Actual result:
Marking starts and Exception occurs. Map zooms to all the way in.

Version: 2.0.2 (Any)

Browser / Operating System:
IE8 / Windows 7

Additional comments:

In DragZoom.prototype.onMouseUp_

AFTER:
if (this.dragging_) {

BEFORE: 
var left = Math.min(this.startPt_.x, this.endPt_.x);

ADD:
if ((this.getMousePoint_(e).x == this.startPt_.x) && (this.getMousePoint_(e).y 
== this.startPt_.y)) {
    // Cancel event
    this.onKeyUp_(e);
    return;
}

Original issue reported on code.google.com by ndamkj...@gmail.com on 11 Nov 2010 at 10:06

GoogleCodeExporter commented 8 years ago
This change has been incorporated into r244 (KeyDragZoom 2.0.3).

See http://code.google.com/p/google-maps-utility-library-v3/source/detail?r=224

Original comment by garylitt...@gmail.com on 26 Nov 2010 at 7:46

GoogleCodeExporter commented 8 years ago
Whoops, the change is actually in r224.

Gary

Original comment by garylitt...@gmail.com on 26 Nov 2010 at 8:18

GoogleCodeExporter commented 8 years ago
Fixed in KeyDragZoom 2.0.3

Original comment by garylitt...@gmail.com on 7 Dec 2010 at 8:09