From 693661a658b41d6dedef235b8dcd4410a79aebeb Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 11 Nov 2019 14:47:29 -0500 Subject: [PATCH] Default TR to via-node only, use new key so everyone must re-choose (closes #6922) --- modules/ui/fields/restrictions.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ui/fields/restrictions.js b/modules/ui/fields/restrictions.js index 6b7d0d5f1..661973344 100644 --- a/modules/ui/fields/restrictions.js +++ b/modules/ui/fields/restrictions.js @@ -16,10 +16,12 @@ import { utilGetDimensions, utilSetDimensions } from '../../util/dimensions'; export function uiFieldRestrictions(field, context) { var dispatch = d3_dispatch('change'); var breathe = behaviorBreathe(context); - var storedViaWay = context.storage('turn-restriction-via-way'); + + context.storage('turn-restriction-via-way', null); // remove old key + var storedViaWay = context.storage('turn-restriction-via-way0'); // use new key #6922 var storedDistance = context.storage('turn-restriction-distance'); - var _maxViaWay = storedViaWay !== null ? (+storedViaWay) : 1; + var _maxViaWay = storedViaWay !== null ? (+storedViaWay) : 0; var _maxDistance = storedDistance ? (+storedDistance) : 30; var _initialized = false; var _parent = d3_select(null); // the entire field @@ -185,7 +187,7 @@ export function uiFieldRestrictions(field, context) { var val = d3_select(this).property('value'); _maxViaWay = +val; _container.selectAll('.layer-osm .layer-turns *').remove(); - context.storage('turn-restriction-via-way', _maxViaWay); + context.storage('turn-restriction-via-way0', _maxViaWay); _parent.call(restrictions); });