filter on snapping target does not work for all filter types, r=ahocevar (closes #3468)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12255 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2011-08-17 13:47:08 +00:00
parent 74af61d898
commit 85455619ec
2 changed files with 51 additions and 1 deletions

View File

@@ -476,7 +476,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
feature = features[i];
if(feature !== this.feature && !feature._sketch &&
feature.state !== OpenLayers.State.DELETE &&
(!target.filter || target.filter.evaluate(feature.attributes))) {
(!target.filter || target.filter.evaluate(feature))) {
if(feature.atPoint(ll, maxTolerance, maxTolerance)) {
for(var j=0, stop=Math.min(result.rank+1, numTypes); j<stop; ++j) {
type = this.precedence[j];