Add a clickTolerance option to the Draw interaction

This commit is contained in:
Éric Lemoine
2015-06-05 16:09:51 +02:00
parent bad5a97d20
commit e99f43af8d
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.