Skip to content

Commit

Permalink
Add a hit tolerance to feature selection model.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonseyock committed Jun 8, 2021
1 parent 0e6df60 commit ce79ef5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classic/selection/FeatureModelMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ Ext.define('GeoExt.selection.FeatureModelMixin', {
*/
mapSelection: false,

/**
* Set a pixel tolerance for the map selection. Defaults to 12.
*/
selectionTolerance: 12,

/**
* The default style for the selected features.
* @cfg {ol.style.Style}
Expand Down Expand Up @@ -253,7 +258,8 @@ Ext.define('GeoExt.selection.FeatureModelMixin', {
}, {
layerFilter: function(layer) {
return layer === me.layer;
}
},
hitTolerance: me.selectionTolerance
});

if (feat) {
Expand Down

0 comments on commit ce79ef5

Please sign in to comment.