fix regression where drawing accurately is not possible anymore, r=jorix,bbinet (closes #3272)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11962 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -106,13 +106,6 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
||||
*/
|
||||
pixelTolerance: 5,
|
||||
|
||||
/**
|
||||
* APIProperty: dblclickTolerance
|
||||
* {Number} Maximum number of pixels between two touchend for an
|
||||
* event to be considered a dblclick. Default is 20.
|
||||
*/
|
||||
dblclickTolerance: 20,
|
||||
|
||||
/**
|
||||
* Property: touch
|
||||
* {Boolean} Indcates the support of touch events.
|
||||
@@ -526,8 +519,7 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
||||
return true;
|
||||
}
|
||||
// ignore double-clicks
|
||||
if (this.lastUp && this.passesTolerance(this.lastUp, evt.xy,
|
||||
this.dblclickTolerance)) {
|
||||
if (this.lastUp && this.lastUp.equals(evt.xy)) {
|
||||
return true;
|
||||
}
|
||||
if (this.lastDown && this.passesTolerance(this.lastDown, evt.xy,
|
||||
@@ -564,13 +556,9 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
||||
/**
|
||||
* Method: passesTolerance
|
||||
* Determine whether the event is within the optional pixel tolerance.
|
||||
* Note that the pixel tolerance check only works if mousedown events get
|
||||
* to the listeners registered here. If they are stopped by other
|
||||
* elements, <pixelTolerance> and <dblclickTolerance> will have no effect
|
||||
* here (this method will always return true).
|
||||
*
|
||||
* Returns:
|
||||
* {Boolean} The click is within the pixel tolerance (if specified).
|
||||
* {Boolean} The event is within the pixel tolerance (if specified).
|
||||
*/
|
||||
passesTolerance: function(pixel1, pixel2, tolerance) {
|
||||
var passes = true;
|
||||
|
||||
Reference in New Issue
Block a user