Fix bug in ol.geom.Circle#containsXY, thanks @vdubr
This commit is contained in:
1 parent
6e91ee6bdd
commit
e08b2bd0bf
1 file changed
+1
-1
@@ -72,7 +72,7 @@ ol.geom.Circle.prototype.containsXY = function(x, y) {
|
||||
var dx = x - flatCoordinates[0];
|
||||
var dy = y - flatCoordinates[1];
|
||||
var r = flatCoordinates[this.stride] - flatCoordinates[0];
|
||||
return dx * dx + dy * dy <= r;
|
||||
return Math.sqrt(dx * dx + dy * dy) <= r;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user