aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2019-11-28 12:59:05 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-02-06 14:41:05 +0000
commit1a434a346ab19da66c6b951b09309f5ad059b5b1 (patch)
tree9dcbab6cca5a8efb50a91a0b028124eed6c47ede
parent7c55ac726b8e2b2f25af4c58d2f65420d3a177d1 (diff)
enable layer snap threshold to be 0 to disable snapping
-rw-r--r--web/cobrands/fixmystreet/assets.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index 327c31346..ac967d523 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -72,7 +72,10 @@ OpenLayers.Layer.VectorAsset = OpenLayers.Class(OpenLayers.Layer.Vector, {
if (!fixmystreet.markers.getVisibility() || !(this.getVisibility() && this.inRange)) {
return;
}
- var threshold = this.fixmystreet.snap_threshold || 50; // metres
+ var threshold = 50; // metres
+ if ( this.fixmystreet.snap_threshold || this.fixmystreet.snap_threshold === 0 ) {
+ threshold = this.fixmystreet.snap_threshold;
+ }
var marker = fixmystreet.markers.features[0];
if (marker === undefined) {
// No marker to be found so bail out