Merge pull request #3766 from elemoine/draw-click-tolerance

Add a clickTolerance option to the Draw interaction
This commit is contained in:
Éric Lemoine
2015-06-16 10:06:01 +02:00
3 changed files with 47 additions and 6 deletions

View File

@@ -265,7 +265,8 @@ ol.interaction.Draw = function(options) {
* @type {number}
* @private
*/
this.squaredClickTolerance_ = 4;
this.squaredClickTolerance_ = goog.isDef(options.clickTolerance) ?
options.clickTolerance * options.clickTolerance : 36;
/**
* Draw overlay where our sketch features are drawn.